I am working on Ubuntu 16.04 with cmake 3.5.1, opencv3.3.0
copy the "face detection lib" and "face_detection.h" to the directory "build" for building the test example.
I move the 'libseeta_facedet_lib.so' which was built in FaceDetection/build/ and 'face_detection.h' into FaceAlignment/build/ , and I got some errors:
Scanning dependencies of target seeta_fa_lib [ 16%] Building CXX object CMakeFiles/seeta_fa_lib.dir/src/cfan.cpp.o /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp: In member function ‘void CCFAN::FacialPointLocate(const unsigned char*, int, int, seeta::FaceInfo, float*)’: /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:208:33: error: ‘isnan’ was not declared in this scope if (isnan(fea[j * 128 + i])) ^ /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:208:33: note: suggested alternative: In file included from /home/huaizhi/SeetaFaceEngine/FaceAlignment/include/cfan.h:33:0, from /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:33: /usr/include/c++/5/cmath:641:5: note: ‘std::isnan’ isnan(_Tp __x) ^ /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:284:33: error: ‘isnan’ was not declared in this scope if (isnan(fea[j * 128 + i])) ^ /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:284:33: note: suggested alternative: In file included from /home/huaizhi/SeetaFaceEngine/FaceAlignment/include/cfan.h:33:0, from /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:33: /usr/include/c++/5/cmath:641:5: note: ‘std::isnan’ isnan(_Tp __x) ^ /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp: In member function ‘void CCFAN::InitModel(const char*)’: /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:111:54: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] fread(mean_shape_, sizeof(float), pts_num_ * 2, fp); ^ /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:114:41: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] fread(&lan1_size_, sizeof(int), 1, fp); ^ /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:116:54: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] fread(lan1_structure_, sizeof(int), lan1_size_, fp); ^ /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:124:53: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] fread(lan1_w_[i], sizeof(float), layer_size, fp); ^ /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:127:65: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] fread(lan1_b_[i], sizeof(float), lan1_structure_[i + 1], fp); ^ /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:131:41: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] fread(&lan2_size_, sizeof(int), 1, fp); ^ /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:133:54: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] fread(lan2_structure_, sizeof(int), lan2_size_, fp); ^ /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:141:53: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] fread(lan2_w_[i], sizeof(float), layer_size, fp); ^ /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:144:65: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] fread(lan2_b_[i], sizeof(float), lan2_structure_[i + 1], fp); ^ CMakeFiles/seeta_fa_lib.dir/build.make:62: recipe for target 'CMakeFiles/seeta_fa_lib.dir/src/cfan.cpp.o' failed make[2]: *** [CMakeFiles/seeta_fa_lib.dir/src/cfan.cpp.o] Error 1 CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/seeta_fa_lib.dir/all' failed make[1]: *** [CMakeFiles/seeta_fa_lib.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2
please help me!
I am working on Ubuntu 16.04 with cmake 3.5.1, opencv3.3.0
Scanning dependencies of target seeta_fa_lib [ 16%] Building CXX object CMakeFiles/seeta_fa_lib.dir/src/cfan.cpp.o /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp: In member function ‘void CCFAN::FacialPointLocate(const unsigned char*, int, int, seeta::FaceInfo, float*)’: /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:208:33: error: ‘isnan’ was not declared in this scope if (isnan(fea[j * 128 + i])) ^ /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:208:33: note: suggested alternative: In file included from /home/huaizhi/SeetaFaceEngine/FaceAlignment/include/cfan.h:33:0, from /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:33: /usr/include/c++/5/cmath:641:5: note: ‘std::isnan’ isnan(_Tp __x) ^ /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:284:33: error: ‘isnan’ was not declared in this scope if (isnan(fea[j * 128 + i])) ^ /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:284:33: note: suggested alternative: In file included from /home/huaizhi/SeetaFaceEngine/FaceAlignment/include/cfan.h:33:0, from /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:33: /usr/include/c++/5/cmath:641:5: note: ‘std::isnan’ isnan(_Tp __x) ^ /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp: In member function ‘void CCFAN::InitModel(const char*)’: /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:111:54: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] fread(mean_shape_, sizeof(float), pts_num_ * 2, fp); ^ /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:114:41: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] fread(&lan1_size_, sizeof(int), 1, fp); ^ /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:116:54: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] fread(lan1_structure_, sizeof(int), lan1_size_, fp); ^ /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:124:53: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] fread(lan1_w_[i], sizeof(float), layer_size, fp); ^ /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:127:65: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] fread(lan1_b_[i], sizeof(float), lan1_structure_[i + 1], fp); ^ /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:131:41: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] fread(&lan2_size_, sizeof(int), 1, fp); ^ /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:133:54: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] fread(lan2_structure_, sizeof(int), lan2_size_, fp); ^ /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:141:53: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] fread(lan2_w_[i], sizeof(float), layer_size, fp); ^ /home/huaizhi/SeetaFaceEngine/FaceAlignment/src/cfan.cpp:144:65: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] fread(lan2_b_[i], sizeof(float), lan2_structure_[i + 1], fp); ^ CMakeFiles/seeta_fa_lib.dir/build.make:62: recipe for target 'CMakeFiles/seeta_fa_lib.dir/src/cfan.cpp.o' failed make[2]: *** [CMakeFiles/seeta_fa_lib.dir/src/cfan.cpp.o] Error 1 CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/seeta_fa_lib.dir/all' failed make[1]: *** [CMakeFiles/seeta_fa_lib.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2
please help me!