在android平台编译并使用dlib人脸识别库

来源:互联网 发布:提取方格网4角数据 编辑:程序博客网 时间:2024/06/07 03:46

编译dlib

新建项目,选择c++支持,在CMakeLists.txt中添加dlib:

include(src/main/cpp/dlib/cmake)  

再链接dlib库

target_link_libraries( # Specifies the target library.                         native-lib                         dlib                         # Links the target library to the log library                         # included in the NDK.                         ${log-lib} ) 

参考http://blog.csdn.net/hjimce/article/details/64127654

遇到问题

1.std::to_string
2. error :no member named ‘round’ in namespace ‘std’; did you mean simply ‘round’?
3. error: no type named ‘exception_ptr’ in namespace ‘std’; did you mean ‘exception’?
都在 http://blog.csdn.net/qi_w_ip/article/details/76286216里面有很好的解答

经验总结

1.将dlib移植到android应该是有很多人做过的,先不急着上手编译,而应该广泛搜索解决方案。
2.cmake很实用,早点系统学习。

原创粉丝点击