问题1:
./start: symbol lookup error: ./libFaceAgeGender.so: undefined symbol: _ZN2cv17CascadeClassifier4loadERKSs
解决方法:
把opencv 人脸检测的部分运行 出现错误:
undefined symbol: _ZN2cv6imreadERKSsi
解决方法: 把人脸检测额的代码在本地的机器上编译一下 就可以了。
看来不能执行的问题也应该是在本地上编译一下就能解决了。
想着可能是需要把Testso 下面的文件make一遍 就能解决这葛问题
但是make 不过去 出现的问题是:
g++ -I /home/lxbot/face_detection_gender/Project_Face/opencv248/include -I /home/lxbot/face_detection_gender/Project_Face/opencv248/include/opencv -I /home/lxbot/face_detection_gender/Project_Face/opencv248/include/opencv2 -o start main.o -L /home/lxbot/face_detection_gender/caffelib -llmdb -lleveldb -lcaffe -lcublas -lcudart -lcurand -lboost_system -lboost_thread -lcudnn -lFaceAgeGender -luctools -lprotobuf -lopencv_flann -lopencv_video -lopencv_features2d -lopencv_objdetect -lopencv_core -lopencv_imgproc -lopencv_highgui -lhdf5 -lglog -lhdf5_hl #
/home/lxbot/face_detection_gender/caffelib/libFaceAgeGender.so: undefined reference to `Ctools_Init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int)'
/home/lxbot/face_detection_gender/caffelib/libFaceAgeGender.so: undefined reference to `Ctools_ClassifyAndFeaExtract(void*, unsigned char*, int, int, int, CTOOLS_Result*, double*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void (*)(float*, int, int, int, int))'
/home/lxbot/face_detection_gender/caffelib/libFaceAgeGender.so: undefined reference to `cv::CascadeClassifier::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status
Makefile:18: recipe for target 'start' failed
make: *** [start] Error 1
猜测出现这个问题的原因是:
在libFaceAgeGender.so 链接的ldd libFaceAgeGender.so 的opencv 使用的版本是2.4.8
但是ldd 发现