Symbol 'cv' could not be resolved in eclipse
c++, eclipse, opencv
Solution
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
- Go to your project's properties
- click C/C++ Build
- click Settings
- find GCC C++ Linker (under the Tool Settings tab)
- press Libraries
- Add the OpenCV libraries.
DETAILED GUIDE
OpenCV has an official guide on how to make it work with Eclipse:
- opencv.org - Using OpenCV with Eclipse (plugin CDT)
Problem
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