Undefined symbols for architecture x86_64 ,While using c and c++ code in my Project
I tried to implement the Face landmark detection code,I added the all dependency header files for my Project.When i build the project it shows the errors as:
Undefined symbols for architecture x86_64: "flandmark_free(model_struct)", referenced from: _main in lmd.o "flandmark_init(char const)", referenced from: _main in lmd.o "flandmark_detect(_IplImage, int, model_struct, double, int)", referenced from: detectFaceInImage(_IplImage, _IplImage, CvHaarClassifierCascade, model_struct, int, double) in lmd.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: [dist/Debug/GNU-MacOSX/landmarkdetection] Error 1 make[1]: [.build-conf] Error 2 make: ** [.build-impl] Error 2](http://)
Any one can give ideas to resolve the issue?
please show your compile-cmdline. did you just forget to compile & link the flandmark files ?
CLEAN SUCCESSFUL (total time: 568ms) "/Applications/Xcode.app/Contents/Developer/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf "/Applications/Xcode.app/Contents/Developer/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-MacOSX/landmarkdetection mkdir -p build/Debug/GNU-MacOSX rm -f "build/Debug/GNU-MacOSX/lmd.o.d" g++ -c -g -I/usr/local/include -I/usr/local/include/opencv -I/usr/local/include/opencv2 -MMD -MP -MF "build/Debug/GNU-MacOSX/lmd.o.d" -o build/Debug/GNU-MacOSX/lmd.o lmd.cpp mkdir -p dist/Debug/GNU-MacOSX g++ -o dist/Debug/GNU-MacOSX/landmarkdetection build/Debug/GNU-MacOSX/lmd.o -L/usr/local/lib -lopencv_calib3d.2.4.9 -lopencv_calib3d.2.4 -lopencv_calib3d -lopencv_contrib.2.4.9 -lopencv_contrib.2.4 -lopencv_contrib -lopencv_core.
add flandmark_detector.cpp and liblbp.cpp to your project.
I added that Libraries too beark.
well, they weren't compiled, am i wrong ?
No, Berak ,In the source link also they mentioned to include the two .cpp files to the project.But some issues is happening