OpenCV compile error undefined reference to `cv::createEigenFaceRecognizer(int, double)'-Collection of common programming errors
I’ve been trying to figure this out for three days, but I’m quite new to C++ and I seem to have hit a wall.
I want to change one of the opencv source files, particularly the eigenfaces function written by bytefish. I want to have it return many faces instead of one. I believe I figured this part out.
The problem is that, when I recompile opencv, no matter what dll I use, when compiling the demo facial recognition code, I get a couple errors:
SET: IncDir = C:\opencv\build\include
$(INCDIR) = C:\opencv\build\include
SET: LibDir = C:\opencv\build\x86\mingw\lib
$(LIBDIR) = C:\opencv\build\x86\mingw\lib
g++ -I"C:\opencv\build\include" -L"C:\opencv\build\x86\mingw\lib" facerec_eigenfaces.cpp -lopencv_calib3d243 -lopencv_contrib243 -lopencv_core243 -lopencv_features2d243 -lopencv_flann243 -lopencv_gpu243 -lopencv_highgui243 -lopencv_imgproc243 -lopencv_legacy243 -lopencv_ml243 -lopencv_nonfree243 -lopencv_objdetect243 -lopencv_photo243 -lopencv_stitching243 -lopencv_video243 -lopencv_videostab243 -o facerec_eigenfaces
Process started >>>
C:\Users\Nate\AppData\Local\Temp\ccDRRGhr.o:facerec_eigenfaces.cpp:(.text+0x8a0): undefined reference to `cv::createEigenFaceRecognizer(int, double)'
C:\Users\Nate\AppData\Local\Temp\ccDRRGhr.o:facerec_eigenfaces.cpp:(.text+0xdf5): undefined reference to `cv::applyColorMap(cv::_InputArray const&, cv::_OutputArray const&, int)'
collect2: ld returned 1 exit status
Originally posted 2013-11-06 03:30:53.