I am on macOS Sierra 10.12. I recently downloaded Dlib and tried to build the examples following what the websites says exactly. I keep getting errors related to building the webcam_face_pose_ex.cpp file. This happens to be the file I was most interested in building.
The error that I keep running into when I follow the website build instructions are below:
Undefined symbols for architecture x86_64:
"cv::VideoCapture::VideoCapture(int)", referenced from:
_main in webcam_face_pose_ex.cpp.o
"cv::VideoCapture::~VideoCapture()", referenced from:
_main in webcam_face_pose_ex.cpp.o
"cv::VideoCapture::isOpened() const", referenced from:
_main in webcam_face_pose_ex.cpp.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]: *** [webcam_face_pose_ex] Error 1
make[1]: *** [CMakeFiles/webcam_face_pose_ex.dir/all] Error 2
make: *** [all] Error 2
Since the cmake option kept failing, I then tried to compile just this file with the following commands.
g++ -std=c++11 webcam_face_pose_ex.cpp -o webcam_face_pose 'pkg-config --cflags --libs opencv dlib-1'
When I compiled that I received the below error:
Undefined symbols for architecture x86_64:
"_dgesvd_", referenced from:
dlib::lapack::binding::gesvd(char, char, int, int, double*, int, double*, double*, int, double*, int, double*, int) in webcam_face_pose_ex-91429f.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
mv: rename webcam_face_pose_ex to build/webcam_face_pose_ex: No such file or directory
I do not know how to fix this. I do know that it is caused by line#54 in webcam_face_pose_ex.cpp with this line frontal_face_detector detector = get_frontal_face_detector();
.
I know this because I commented out everything in main(), compiled successfully. I uncommented line by line until it failed again at line 54. Any thoughts on what I can do?
Aucun commentaire:
Enregistrer un commentaire