Compiling dlib on OS X

落爺英雄遲暮 提交于 2019-12-06 10:24:55

The right solution is to add missing libraries for linking. When Dlib was build - it found some BLAS library and enabled BLAS support. To find this library - take a look at pkgconfig file from dlib that is located at /Users/user/dlib_build/lib/pkgconfig, it will have line like "Libs: -L${libdir} -ldlib" Qt does not manage such dependencies automatically, so you should add blas libraries by hand

The other (simple) solution is to build dlib without BLAS/LAPACK support: In dlib root:

mkdir build
cd build
cmake .. -DDLIB_USE_BLAS=OFF -DDLIB_USE_LAPACK=OFF -DCMAKE_INSTALL_PREFIX=/Users/user/dlib_build
cmake --build . --config Release --target install

add framework accelerate is fine

if you use cmake, add:

target_link_libraries(your_app "-framework accelerate")

if you use xcode, add accelerate directly.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!