Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ Dlib人脸地标检测链接器错误_C++_Opencv_C++11_Linker_Dlib - Fatal编程技术网

C++ Dlib人脸地标检测链接器错误

C++ Dlib人脸地标检测链接器错误,c++,opencv,c++11,linker,dlib,C++,Opencv,C++11,Linker,Dlib,我最近从源代码安装了OpenCV 3.0。然后我在macOS Sierra 10.12上通过自制安装了Dlib,因为我想了解更多关于计算机视觉的知识 我试图编译在Dlib的网站上找到的程序,我得到了以下链接器错误,我一直没有找到正确的编译器标志来修复这个错误。我也不确定我是否真的安装了所需的软件 我收到的链接器错误是: Undefined symbols for architecture x86_64: "_DGifCloseFile", referenced from: void dlib:

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

我试图编译在Dlib的网站上找到的程序,我得到了以下链接器错误,我一直没有找到正确的编译器标志来修复这个错误。我也不确定我是否真的安装了所需的软件

我收到的链接器错误是:

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
架构x86_64的未定义符号: “_DGifCloseFile”,引用自: void dlib::加载面中的图像(dlib::array2d&,std:uuu 1::基本字符串常量&)u landmark_detection-7a9d91.o “DGifOpenFileName”,引用自: void dlib::加载面中的图像(dlib::array2d&,std:uuu 1::基本字符串常量&)u landmark_detection-7a9d91.o “_DGifSlurp”,引用自: void dlib::加载面中的图像(dlib::array2d&,std:uuu 1::基本字符串常量&)u landmark_detection-7a9d91.o “_cblas_dgemm”,引用自: 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,double*,int)在face_landmark\u detection-7a9d91.o中 “\u cblas\u saxpy”,引用自: dlib::blas_bindings::cblas_axpy(int,float,float const*,int,float*,int)in face_landmark_detection-7a9d91.o “\u cblas\u sscal”,引用自: dlib::blas_bindings::cblas_scal(int,float,float*)在脸上_landmark_detection-7a9d91.o “_dgesvd_”,引用自: dlib::lapack::binding::gesvd(字符、字符、int、int、double*、int、double*、int、double*、int、double*、int、int、double*、int)中的面标记检测-7a9d91.o ld:找不到架构x86_64的符号 叮当声:错误:链接器命令失败,退出代码为1(使用-v查看调用)

(我安装了--HEAD,因为
brew安装opencv3
对我不起作用)
自制安装OpenCV:
brew点击自制/科学;brew安装--头部opencv3
自制安装的Dlib:
brew安装Dlib

编译标志:
g++-std=c++11 face\u landmark\u 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/L/usr/local/Cellar/opencv3/HEAD-de35c59_4/lib-L-L/L-L/L/L/L/L/Cellar/dlib/19.1/L/L/L/L/L/L/L/dlib/L/L/L/L/L/L/L/L/L/L/L/L/L/L/L/L/L/L/-lopencv_缝合-lopencv_对象检测-lopencv_superres-lopencv_videostab-lopencv_calib3d-lopencv_功能2d-lopencv_highgui-lopencv_视频-lopencv_图片-lopencv_ml-lopencv_imgproc-lopencv_flann-lopencv_核心-ldlib-lpng16


有人能告诉我哪些文件需要链接吗?

使用cmake如何?您使用的是什么操作系统?哦!我忘了添加操作系统。我在第一句话中加了它。我在OSX El Capitan上。我想用自制软件安装它们,这样如果任何一个库发生任何更新,我的工作量就会减少。如果我不明白这一点,我完全会用cmake安装这两个软件。使用cmake怎么样?你使用的是什么操作系统?哦!我忘了添加操作系统。我在第一句话中加了它。我在OSX El Capitan上。我想用自制软件安装它们,这样如果任何一个库发生任何更新,我的工作量就会减少。如果我不明白这一点,我完全会用cmake安装这两个。