我已经使用Homebrew安装了dlib。
brew install dlib
此操作:
/usr/local/Cellar/dlib/19.16/include
添加到标题搜索路径 /usr/local/Cellar/dlib/19.16/lib
添加到库搜索路径 -ldlib
添加到其他链接器标记 Accelerate.framework
,然后在链接二进制文件和库 但是当我包含dlib的.h文件时出现错误:
Undefined symbols for architecture x86_64:
"_USER_ERROR__missing_dlib_all_source_cpp_file__OR__inconsistent_use_of_DEBUG_or_ENABLE_ASSERTS_preprocessor_directives_", referenced from:
_dlib_check_consistent_assert_usage in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
P.S。是的,我使用-v,但是没有效果