I’m running 32-bit Windows 7 Enterprise and CodeBlocks 10.05.
I followed this tutorial to set up OpenCV 2.2 to work with CodeBlocks.
Any programs that use the C CodeBlocks API work fine – they compile, link, and run fine.
However, when I try to use C++ OpenCV functions and objects, .o files are generated, but I get linking errors, such as:
undefined reference to
`cv::cvtColor(cv::Mat const&, cv::Mat&, int, int)'
After some Googling, I found that this was because I didn’t include enough libraries in my search directories. However, I don’t know what libraries to include.
After some searching in my OpenCV folder, I found some .a files in 3rdParty/lib and added them, too. But my problem persists.
Does anyone know what libraries I have to include in order to get my program to work?
If you need more information, please tell me and I’ll give it to you.
You need to include the
libopencv_imgproclibrary.