Closed endersaka closed 6 years ago
I add some informations. This are all the OpenCV libraries I've found and their architecture. Working directory is the OpenCV libraries directory.
$ OCV2LIBS=$(ls *.dylib)
$ for OCV2LIB in $OCV2LIBS ; do echo "file $OCV2LIB"; file $OCV2LIB; done
file libopencv_aruco.3.4.1.dylib
libopencv_aruco.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_aruco.3.4.dylib
libopencv_aruco.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_aruco.dylib
libopencv_aruco.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_bgsegm.3.4.1.dylib
libopencv_bgsegm.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_bgsegm.3.4.dylib
libopencv_bgsegm.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_bgsegm.dylib
libopencv_bgsegm.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_bioinspired.3.4.1.dylib
libopencv_bioinspired.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_bioinspired.3.4.dylib
libopencv_bioinspired.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_bioinspired.dylib
libopencv_bioinspired.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_calib3d.3.4.1.dylib
libopencv_calib3d.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_calib3d.3.4.dylib
libopencv_calib3d.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_calib3d.dylib
libopencv_calib3d.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_ccalib.3.4.1.dylib
libopencv_ccalib.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_ccalib.3.4.dylib
libopencv_ccalib.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_ccalib.dylib
libopencv_ccalib.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_core.3.4.1.dylib
libopencv_core.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_core.3.4.dylib
libopencv_core.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_core.dylib
libopencv_core.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_datasets.3.4.1.dylib
libopencv_datasets.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_datasets.3.4.dylib
libopencv_datasets.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_datasets.dylib
libopencv_datasets.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_dnn.3.4.1.dylib
libopencv_dnn.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_dnn.3.4.dylib
libopencv_dnn.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_dnn.dylib
libopencv_dnn.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_dnn_objdetect.3.4.1.dylib
libopencv_dnn_objdetect.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_dnn_objdetect.3.4.dylib
libopencv_dnn_objdetect.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_dnn_objdetect.dylib
libopencv_dnn_objdetect.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_dpm.3.4.1.dylib
libopencv_dpm.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_dpm.3.4.dylib
libopencv_dpm.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_dpm.dylib
libopencv_dpm.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_face.3.4.1.dylib
libopencv_face.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_face.3.4.dylib
libopencv_face.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_face.dylib
libopencv_face.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_features2d.3.4.1.dylib
libopencv_features2d.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_features2d.3.4.dylib
libopencv_features2d.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_features2d.dylib
libopencv_features2d.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_flann.3.4.1.dylib
libopencv_flann.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_flann.3.4.dylib
libopencv_flann.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_flann.dylib
libopencv_flann.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_fuzzy.3.4.1.dylib
libopencv_fuzzy.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_fuzzy.3.4.dylib
libopencv_fuzzy.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_fuzzy.dylib
libopencv_fuzzy.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_hfs.3.4.1.dylib
libopencv_hfs.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_hfs.3.4.dylib
libopencv_hfs.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_hfs.dylib
libopencv_hfs.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_highgui.3.4.1.dylib
libopencv_highgui.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_highgui.3.4.dylib
libopencv_highgui.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_highgui.dylib
libopencv_highgui.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_img_hash.3.4.1.dylib
libopencv_img_hash.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_img_hash.3.4.dylib
libopencv_img_hash.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_img_hash.dylib
libopencv_img_hash.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_imgcodecs.3.4.1.dylib
libopencv_imgcodecs.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_imgcodecs.3.4.dylib
libopencv_imgcodecs.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_imgcodecs.dylib
libopencv_imgcodecs.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_imgproc.3.4.1.dylib
libopencv_imgproc.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_imgproc.3.4.dylib
libopencv_imgproc.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_imgproc.dylib
libopencv_imgproc.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_line_descriptor.3.4.1.dylib
libopencv_line_descriptor.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_line_descriptor.3.4.dylib
libopencv_line_descriptor.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_line_descriptor.dylib
libopencv_line_descriptor.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_ml.3.4.1.dylib
libopencv_ml.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_ml.3.4.dylib
libopencv_ml.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_ml.dylib
libopencv_ml.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_objdetect.3.4.1.dylib
libopencv_objdetect.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_objdetect.3.4.dylib
libopencv_objdetect.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_objdetect.dylib
libopencv_objdetect.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_optflow.3.4.1.dylib
libopencv_optflow.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_optflow.3.4.dylib
libopencv_optflow.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_optflow.dylib
libopencv_optflow.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_phase_unwrapping.3.4.1.dylib
libopencv_phase_unwrapping.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_phase_unwrapping.3.4.dylib
libopencv_phase_unwrapping.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_phase_unwrapping.dylib
libopencv_phase_unwrapping.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_photo.3.4.1.dylib
libopencv_photo.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_photo.3.4.dylib
libopencv_photo.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_photo.dylib
libopencv_photo.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_plot.3.4.1.dylib
libopencv_plot.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_plot.3.4.dylib
libopencv_plot.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_plot.dylib
libopencv_plot.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_reg.3.4.1.dylib
libopencv_reg.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_reg.3.4.dylib
libopencv_reg.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_reg.dylib
libopencv_reg.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_rgbd.3.4.1.dylib
libopencv_rgbd.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_rgbd.3.4.dylib
libopencv_rgbd.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_rgbd.dylib
libopencv_rgbd.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_saliency.3.4.1.dylib
libopencv_saliency.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_saliency.3.4.dylib
libopencv_saliency.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_saliency.dylib
libopencv_saliency.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_shape.3.4.1.dylib
libopencv_shape.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_shape.3.4.dylib
libopencv_shape.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_shape.dylib
libopencv_shape.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_stereo.3.4.1.dylib
libopencv_stereo.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_stereo.3.4.dylib
libopencv_stereo.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_stereo.dylib
libopencv_stereo.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_stitching.3.4.1.dylib
libopencv_stitching.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_stitching.3.4.dylib
libopencv_stitching.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_stitching.dylib
libopencv_stitching.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_structured_light.3.4.1.dylib
libopencv_structured_light.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_structured_light.3.4.dylib
libopencv_structured_light.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_structured_light.dylib
libopencv_structured_light.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_superres.3.4.1.dylib
libopencv_superres.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_superres.3.4.dylib
libopencv_superres.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_superres.dylib
libopencv_superres.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_surface_matching.3.4.1.dylib
libopencv_surface_matching.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_surface_matching.3.4.dylib
libopencv_surface_matching.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_surface_matching.dylib
libopencv_surface_matching.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_text.3.4.1.dylib
libopencv_text.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_text.3.4.dylib
libopencv_text.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_text.dylib
libopencv_text.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_tracking.3.4.1.dylib
libopencv_tracking.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_tracking.3.4.dylib
libopencv_tracking.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_tracking.dylib
libopencv_tracking.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_video.3.4.1.dylib
libopencv_video.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_video.3.4.dylib
libopencv_video.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_video.dylib
libopencv_video.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_videoio.3.4.1.dylib
libopencv_videoio.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_videoio.3.4.dylib
libopencv_videoio.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_videoio.dylib
libopencv_videoio.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_videostab.3.4.1.dylib
libopencv_videostab.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_videostab.3.4.dylib
libopencv_videostab.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_videostab.dylib
libopencv_videostab.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_xfeatures2d.3.4.1.dylib
libopencv_xfeatures2d.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_xfeatures2d.3.4.dylib
libopencv_xfeatures2d.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_xfeatures2d.dylib
libopencv_xfeatures2d.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_ximgproc.3.4.1.dylib
libopencv_ximgproc.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_ximgproc.3.4.dylib
libopencv_ximgproc.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_ximgproc.dylib
libopencv_ximgproc.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_xobjdetect.3.4.1.dylib
libopencv_xobjdetect.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_xobjdetect.3.4.dylib
libopencv_xobjdetect.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_xobjdetect.dylib
libopencv_xobjdetect.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_xphoto.3.4.1.dylib
libopencv_xphoto.3.4.1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_xphoto.3.4.dylib
libopencv_xphoto.3.4.dylib: Mach-O 64-bit dynamically linked shared library x86_64
file libopencv_xphoto.dylib
libopencv_xphoto.dylib: Mach-O 64-bit dynamically linked shared library x86_64
I made a further log with make VERBOSE=1
.
make VERBOSE=1
/usr/local/Cellar/cmake/3.11.4/bin/cmake -H/Users/myname/GitHubClones/4dface -B/Users/myname/GitHubClones/4dface/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/Cellar/cmake/3.11.4/bin/cmake -E cmake_progress_start /Users/myname/GitHubClones/4dface/build/CMakeFiles /Users/myname/GitHubClones/4dface/build/CMakeFiles/progress.marks
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/Makefile2 all
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/4dface.dir/build.make CMakeFiles/4dface.dir/depend
cd /Users/myname/GitHubClones/4dface/build && /usr/local/Cellar/cmake/3.11.4/bin/cmake -E cmake_depends "Unix Makefiles" /Users/myname/GitHubClones/4dface /Users/myname/GitHubClones/4dface /Users/myname/GitHubClones/4dface/build /Users/myname/GitHubClones/4dface/build /Users/myname/GitHubClones/4dface/build/CMakeFiles/4dface.dir/DependInfo.cmake --color=
Dependee "/Users/myname/GitHubClones/4dface/build/CMakeFiles/4dface.dir/DependInfo.cmake" is newer than depender "/Users/myname/GitHubClones/4dface/build/CMakeFiles/4dface.dir/depend.internal".
Dependee "/Users/myname/GitHubClones/4dface/build/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/Users/myname/GitHubClones/4dface/build/CMakeFiles/4dface.dir/depend.internal".
Scanning dependencies of target 4dface
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/4dface.dir/build.make CMakeFiles/4dface.dir/build
[ 50%] Building CXX object CMakeFiles/4dface.dir/apps/4dface.cpp.o
/usr/local/bin/g++-7 -isystem /usr/local/include -isystem /usr/local/include/opencv -I/usr/local/include/eigen3 -I/Users/myname/GitHubClones/4dface/external/superviseddescent/include -I/Users/myname/GitHubClones/4dface/external/eos/include -I/Users/myname/GitHubClones/4dface/external/eos/3rdparty/cereal/include -I/Users/myname/GitHubClones/4dface/external/eos/3rdparty/glm -I/Users/myname/GitHubClones/4dface/external/eos/3rdparty/nanoflann/include -I/Users/myname/GitHubClones/4dface/external/eos/3rdparty/eigen3-nnls/src -I/Users/myname/GitHubClones/4dface/external/eos/3rdparty/toml11 -std=c++14 -O3 -DNDEBUG -o CMakeFiles/4dface.dir/apps/4dface.cpp.o -c /Users/myname/GitHubClones/4dface/apps/4dface.cpp
[100%] Linking CXX executable 4dface
/usr/local/Cellar/cmake/3.11.4/bin/cmake -E cmake_link_script CMakeFiles/4dface.dir/link.txt --verbose=1
/usr/local/bin/g++-7 -std=c++14 -O3 -DNDEBUG -Wl,-search_paths_first -Wl,-headerpad_max_install_names -pthread CMakeFiles/4dface.dir/apps/4dface.cpp.o -o 4dface /usr/local/lib/libopencv_highgui.3.4.1.dylib /usr/local/lib/libopencv_videoio.3.4.1.dylib /usr/local/lib/libopencv_objdetect.3.4.1.dylib /usr/local/lib/libboost_system-mt.dylib /usr/local/lib/libboost_filesystem-mt.dylib /usr/local/lib/libboost_program_options-mt.dylib /usr/local/lib/libopencv_imgcodecs.3.4.1.dylib /usr/local/lib/libopencv_imgproc.3.4.1.dylib /usr/local/lib/libopencv_core.3.4.1.dylib
Undefined symbols for architecture x86_64:
"cv::CascadeClassifier::detectMultiScale(cv::_InputArray const&, std::vector<cv::Rect_<int>, std::allocator<cv::Rect_<int> > >&, double, int, int, cv::Size_<int>, cv::Size_<int>)", referenced from:
_main in 4dface.cpp.o
"cv::imwrite(cv::String const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)", referenced from:
_main in 4dface.cpp.o
"boost::program_options::to_internal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
boost::program_options::basic_command_line_parser<char>::basic_command_line_parser(int, char const* const*) in 4dface.cpp.o
"boost::program_options::validation_error::get_template[abi:cxx11](boost::program_options::validation_error::kind_t)", referenced from:
boost::program_options::validation_error::validation_error(boost::program_options::validation_error::kind_t, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) in 4dface.cpp.o
"boost::program_options::options_description::options_description(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)", referenced from:
_main in 4dface.cpp.o
"boost::program_options::invalid_option_value::invalid_option_value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
void boost::program_options::validate<boost::filesystem::path, char>(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, boost::filesystem::path*, long) in 4dface.cpp.o
"boost::program_options::error_with_option_name::error_with_option_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)", referenced from:
boost::program_options::validation_error::validation_error(boost::program_options::validation_error::kind_t, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) in 4dface.cpp.o
"boost::program_options::arg[abi:cxx11]", referenced from:
boost::program_options::typed_value<boost::filesystem::path, char>::name[abi:cxx11]() const in 4dface.cpp.o
"boost::program_options::detail::cmdline::cmdline(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)", referenced from:
boost::program_options::basic_command_line_parser<char>::basic_command_line_parser(int, char const* const*) in 4dface.cpp.o
"boost::program_options::operator<<(std::basic_ostream<char, std::char_traits<char> >&, boost::program_options::options_description const&)", referenced from:
_main in 4dface.cpp.o
"boost::program_options::error_with_option_name::substitute_placeholders(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const", referenced from:
vtable for boost::exception_detail::error_info_injector<boost::program_options::invalid_option_value> in 4dface.cpp.o
vtable for boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::program_options::invalid_option_value> > in 4dface.cpp.o
vtable for boost::exception_detail::error_info_injector<boost::program_options::validation_error> in 4dface.cpp.o
vtable for boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::program_options::validation_error> > in 4dface.cpp.o
vtable for boost::program_options::validation_error in 4dface.cpp.o
vtable for boost::program_options::invalid_option_value in 4dface.cpp.o
"boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool) const", referenced from:
vtable for boost::program_options::typed_value<boost::filesystem::path, char> in 4dface.cpp.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[2]: *** [4dface] Error 1
make[1]: *** [CMakeFiles/4dface.dir/all] Error 2
make: *** [all] Error 2
Hi,
This looks like some problem on your system. This sort of question would be more appropriate to ask on http://stackoverflow.com where people can help you more appropriately. I think you will also find eos's .travis.yml helpful, where we CI-test eos successfully on macOS too: https://github.com/patrikhuber/eos/blob/d6bc34fade0f270a130bd8a5bce234856323053b/.travis.yml#L50-L75. It shouldn't be too much different for this 4dface example app.
Thanks. Actually is not system but one of the Cmake command options. As suggested by "ngladitz" in the "cmake" channel (irc.freenode.net) I lauched the compile phase with make VERBOSE=1
command and noticed that the compiler used by Make was g++-7
(that, in my case, is located in the Homebrew packages installation path) instead of the default Mac OS X C and C++ compilers that are cc
and c++
$ make VERBOSE=1
/usr/local/Cellar/cmake/3.11.4/bin/cmake -H/Users/myname/GitHubClones/4dface -B/Users/myname/GitHubClones/4dface/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/Cellar/cmake/3.11.4/bin/cmake -E cmake_progress_start /Users/myname/GitHubClones/4dface/build/CMakeFiles /Users/myname/GitHubClones/4dface/build/CMakeFiles/progress.marks
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/Makefile2 all
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/4dface.dir/build.make CMakeFiles/4dface.dir/depend
cd /Users/myname/GitHubClones/4dface/build && /usr/local/Cellar/cmake/3.11.4/bin/cmake -E cmake_depends "Unix Makefiles" /Users/myname/GitHubClones/4dface /Users/myname/GitHubClones/4dface /Users/myname/GitHubClones/4dface/build /Users/myname/GitHubClones/4dface/build /Users/myname/GitHubClones/4dface/build/CMakeFiles/4dface.dir/DependInfo.cmake --color=
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/4dface.dir/build.make CMakeFiles/4dface.dir/build
[ 50%] Linking CXX executable 4dface
/usr/local/Cellar/cmake/3.11.4/bin/cmake -E cmake_link_script CMakeFiles/4dface.dir/link.txt --verbose=1
/usr/local/bin/g++-7 -std=c++14 -O3 -DNDEBUG -Wl,-search_paths_first -Wl,-headerpad_max_install_names -pthread CMakeFiles/4dface.dir/apps/4dface.cpp.o -o 4dface /usr/local/lib/libopencv_highgui.3.4.1.dylib /usr/local/lib/libopencv_videoio.3.4.1.dylib /usr/local/lib/libopencv_objdetect.3.4.1.dylib /usr/local/lib/libboost_system-mt.dylib /usr/local/lib/libboost_filesystem-mt.dylib /usr/local/lib/libboost_program_options-mt.dylib /usr/local/lib/libopencv_imgcodecs.3.4.1.dylib /usr/local/lib/libopencv_imgproc.3.4.1.dylib /usr/local/lib/libopencv_core.3.4.1.dylib
Undefined symbols for architecture x86_64:
[...]
The compiler was forced to g++-7
and gcc-7
setting the options -DCMAKE_C_COMPILER=gcc-7 -DCMAKE_CXX_COMPILER=g++-7
as suggested in your project README. At a first moment I did not noticed it, since I am not expert. Without help I probably would not be able to find out the cause.
Therefore I launched Cmake removing those options and, so, falling back to the default Mac OS X C and C++ compilers.
cmake -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_BUILD_TYPE=Release -DOpenCV_haarcascades_DIR=/usr/local/Cellar/opencv/3.4.1_5/share/OpenCV/haarcascades ../
The resulting output in fact was slightly different and compilation succede.
$ make VERBOSE=1
/usr/local/Cellar/cmake/3.11.4/bin/cmake -H/Users/myname/GitHubClones/4dface -B/Users/myname/GitHubClones/4dface/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/Cellar/cmake/3.11.4/bin/cmake -E cmake_progress_start /Users/myname/GitHubClones/4dface/build/CMakeFiles /Users/myname/GitHubClones/4dface/build/CMakeFiles/progress.marks
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/Makefile2 all
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/4dface.dir/build.make CMakeFiles/4dface.dir/depend
cd /Users/myname/GitHubClones/4dface/build && /usr/local/Cellar/cmake/3.11.4/bin/cmake -E cmake_depends "Unix Makefiles" /Users/myname/GitHubClones/4dface /Users/myname/GitHubClones/4dface /Users/myname/GitHubClones/4dface/build /Users/myname/GitHubClones/4dface/build /Users/myname/GitHubClones/4dface/build/CMakeFiles/4dface.dir/DependInfo.cmake --color=
Dependee "/Users/myname/GitHubClones/4dface/build/CMakeFiles/4dface.dir/DependInfo.cmake" is newer than depender "/Users/myname/GitHubClones/4dface/build/CMakeFiles/4dface.dir/depend.internal".
Dependee "/Users/myname/GitHubClones/4dface/build/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/Users/myname/GitHubClones/4dface/build/CMakeFiles/4dface.dir/depend.internal".
Scanning dependencies of target 4dface
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/4dface.dir/build.make CMakeFiles/4dface.dir/build
[ 50%] Building CXX object CMakeFiles/4dface.dir/apps/4dface.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -isystem /usr/local/include -isystem /usr/local/include/opencv -I/usr/local/include/eigen3 -I/Users/myname/GitHubClones/4dface/external/superviseddescent/include -I/Users/myname/GitHubClones/4dface/external/eos/include -I/Users/myname/GitHubClones/4dface/external/eos/3rdparty/cereal/include -I/Users/myname/GitHubClones/4dface/external/eos/3rdparty/glm -I/Users/myname/GitHubClones/4dface/external/eos/3rdparty/nanoflann/include -I/Users/myname/GitHubClones/4dface/external/eos/3rdparty/eigen3-nnls/src -I/Users/myname/GitHubClones/4dface/external/eos/3rdparty/toml11 -std=c++14 -O3 -DNDEBUG -o CMakeFiles/4dface.dir/apps/4dface.cpp.o -c /Users/myname/GitHubClones/4dface/apps/4dface.cpp
[100%] Linking CXX executable 4dface
/usr/local/Cellar/cmake/3.11.4/bin/cmake -E cmake_link_script CMakeFiles/4dface.dir/link.txt --verbose=1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -std=c++14 -O3 -DNDEBUG -Wl,-search_paths_first -Wl,-headerpad_max_install_names -pthreads CMakeFiles/4dface.dir/apps/4dface.cpp.o -o 4dface /usr/local/lib/libopencv_highgui.3.4.1.dylib /usr/local/lib/libopencv_videoio.3.4.1.dylib /usr/local/lib/libopencv_objdetect.3.4.1.dylib /usr/local/lib/libboost_system-mt.dylib /usr/local/lib/libboost_filesystem-mt.dylib /usr/local/lib/libboost_program_options-mt.dylib /usr/local/lib/libopencv_imgcodecs.3.4.1.dylib /usr/local/lib/libopencv_imgproc.3.4.1.dylib /usr/local/lib/libopencv_core.3.4.1.dylib
clang: warning: argument unused during compilation: '-pthreads' [-Wunused-command-line-argument]
[100%] Built target 4dface
/usr/local/Cellar/cmake/3.11.4/bin/cmake -E cmake_progress_start /Users/myname/GitHubClones/4dface/build/CMakeFiles 0
I see!
Yes you're right, the -DCMAKE_C_COMPILER=gcc-7 -DCMAKE_CXX_COMPILER=g++-7
is only for people who use Linux, and want to use gcc, and don't have gcc-7 or a more recent version as their default compiler.
My assumption was that people who compile software and use Linux, or even more so macOS, also know about which compiler they're using (and that if they're on macOS, that they probably want to use AppleClang). Or at least that they look at the commands that they're entering and maybe think about what the commands might be doing on their particular system.
I might update the readme at some point a bit, but actually I'm not maintaining this demo much anyway, my main project is eos, the library behind this demo, which you'll find is much more up-to-date.
Thanks for reporting back the solution, I'm sure it might be useful to someone else in the future.
I have tried to compile on Mac OS X Sierra, using Homebrew for the dependencies, and failed.
The cmake command:
I placed the "build" dir inside the "4dface" dir. And this is the failure message.