Ask Your Question

Undefined reference to "cv::name_function"

asked 2012-12-13 12:02:01 -0600

mimya gravatar image mimya
11 1

I I am using ubuntu 11.10, opencv 2.4.2, genom 2 I try to build a module using make but I abtain the error undefined reference to.. each time a function of opencv is needed, I include the following

#include <cv.h> 
#include <highgui.h>
#include "/home/amina/src/openrobots/include/opencv2/imgproc/imgproc.hpp"
#include "/home/amina/src/openrobots/include/opencv2/objdetect/objdetect.hpp"
#include "/home/amina/src/openrobots/include/opencv2/highgui/highgui.hpp"
#include "/home/amina/src/openrobots/include/opencv2/core/core.hpp"

I used opencv function before, and all was alright. Now I am using opencv with genom I got this problem.

THank you for any indication

delete close flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-12-19 12:10:04 -0600

mimya gravatar image mimya
11 1


I solved the problem and I want share the answer with you. I installed OpenCV 2.4.2 manually, the prefix installation was /usr/local/ Genom ( the tool I use) installed another version automatically, that was version 2.4.1 and the prefix was /home/amina/src/openrobots My variables PKG_CONFIG_PATH and LD_LIBRARY_PATH included both prefexies and I was passing genom prefix to ./configure when creating makefiles: all that created a conflict when linking. Now, I modified my environment variables to keep only one link to one version of the library, the one that genom installed.

link delete flag offensive edit

Login/Signup to Answer

Question tools


subscribe to rss feed


Asked: 2012-12-13 12:02:01 -0600

Seen: 114 times

Last updated: Dec 19 '12