Reputation:
I am trying to config openCV in eclipse, in include path i have added
/usr/local/include/opencv
/usr/local/include
and i have used pkg-config --libs opencv to add some library in GCC C++ Linker:
/usr/local/lib/libopencv_calib3d.so
/usr/local/lib/libopencv_contrib.so
...
in header file i included:
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/core/eigen.hpp>
but when i declare
using namespace cv;
i get an error: Symbol 'cv' could not be resolved
Upvotes: 6
Views: 7978
Reputation: 41
You should include at first place /usr/local/include in GCC C++ Compiler. See the next picture.
Upvotes: 3
Reputation: 1
You should include opencv.hpp
go to GCC C++ Compiler, go to Includes. In Include File(-l) add /usr/include/opencv2/opencv.hpp
Upvotes: 0
Reputation: 63797
The problem is that the linker cannot find a symbol named cv
.
Assuming that you have installed everything correctly, ie. that every file [1] is where it's supposed to be, it's because you haven't told the linker what files it should link against.
Note: Are the files listed by pkg-config --libs opencv
actually there?
SOLUTION
DETAILED GUIDE
OpenCV has an official guide on how to make it work with Eclipse:
Upvotes: 7