Dlib Face地标检测链接器错误

时间:2016-10-24 22:02:50

标签: c++ opencv c++11 linker dlib

我最近从源代码安装了OpenCV 3.0。然后我在macOS Sierra 10.12上通过Homebrew安装了Dlib,因为我想了解更多有关计算机视觉的知识。

我正在尝试编译在Dlib网站上找到的the facial landmark detection 程序,我收到以下链接器错误,但我找不到合适的编译器标记来解决这个问题是不成功的。我也不确定我是否确实安装了所需的软件。

我得到的链接器错误是:

Undefined symbols for architecture x86_64:

"_DGifCloseFile", referenced from:
void dlib::load_image<dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> > >(dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in face_landmark_detection-7a9d91.o
"_DGifOpenFileName", referenced from:
  void dlib::load_image<dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> > >(dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in face_landmark_detection-7a9d91.o
"_DGifSlurp", referenced from:
  void dlib::load_image<dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> > >(dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in face_landmark_detection-7a9d91.o
"_cblas_dgemm", referenced from:
  dlib::blas_bindings::cblas_gemm(dlib::blas_bindings::CBLAS_ORDER, dlib::blas_bindings::CBLAS_TRANSPOSE, dlib::blas_bindings::CBLAS_TRANSPOSE, int, int, int, double, double const*, int, double const*, int, double, double*, int) in face_landmark_detection-7a9d91.o
"_cblas_saxpy", referenced from:
  dlib::blas_bindings::cblas_axpy(int, float, float const*, int, float*, int) in face_landmark_detection-7a9d91.o
"_cblas_sscal", referenced from:
  dlib::blas_bindings::cblas_scal(int, float, float*) in face_landmark_detection-7a9d91.o
"_dgesvd_", referenced from:
  dlib::lapack::binding::gesvd(char, char, int, int, double*, int, double*, double*, int, double*, int, double*, int) in face_landmark_detection-7a9d91.o
ld: symbol(s) not found for architecture x86_64

clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)

(我用--HEAD安装,因为brew install opencv3对我不起作用)
自制软件安装了OpenCV:brew tap homebrew/science; brew install --HEAD opencv3 自制软件安装了Dlib:brew install dlib

编译标志: g++ -std=c++11 face_landmark_detection.cpp 'pkg-config --cflags --libs opencv dlib-1'

输出pkg-config --cflags --libs opencv dlib-1:

  

-I / usr / local / Cellar / opencv3 / HEAD-de35c59_4 / include / opencv -I / usr / local / Cellar / opencv3 / HEAD-de35c59_4 / include -I / usr / local / Cellar / dlib / 19.1_2 / include -I / usr / local / Cellar / libpng / 1.6.25 / include / libpng16 -L / usr / local / Cellar / opencv3 / HEAD-de35c59_4 / lib -L ​​/ usr / local / Cellar / dlib / 19.1_2 / LIB-L在/ usr /本地/库/的libpng / 25年6月1日/ lib目录-lopencv_shape -lopencv_stitching -lopencv_objdetect -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_ml -lopencv_imgproc -lopencv_flann -lopencv_core - ldlib -lpng16

有人可以告诉我哪些文件需要链接?

0 个答案:

没有答案