-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Vigra clashes with OpenCV / std namespace pollution #6604
Copy link
Copy link
Closed
Description
Please state the information for your system
- OpenCV version: from git, version eca7523
with opencv-contrib modules from git, version ba1d3ef - Host OS: Debian Stretch, Linux 4.5.0-2-amd64 Fixes #1 SMP Debian 4.5.3-2 (2016-05-08) x86_64 GNU/Linux
- gcc version 5.3.1 20160519 (Debian 5.3.1-20)
- cmake version 3.5.2
In which part of the OpenCV library you got the issue?
The issue arises when I want to use both vigra and OpenCV:
#include <opencv2/opencv.hpp>
#include <vigra/multi_array.hxx>
I made a minimal example project
Expected behaviour
Compile without errors / warnings.
Actual behaviour
Doesn't compile at all.
Additional description
I filed this against vigra first and I was told this is an OpenCV bug since OpenCV adds an abs function to the std:: namespace.
It works if I change the order of the include statements.
Code example to reproduce the issue / Steps to reproduce the issue
Please try to give a full example which will compile as is.
main.cpp:
#include <opencv2/opencv.hpp>
#include <vigra/multi_array.hxx>
int main()
{
return 0;
}
CmakeLists.txt:
project(vigratest2)
cmake_minimum_required(VERSION 2.8)
add_executable(vigratest2 main.cpp)
Reactions are currently unavailable