本文首发于个人博客https://kezunlin.me/post/c6ead512/,欢迎阅读!

compile dlib on ubuntu 16.04

Series

Guide

compile

git clone https://github.com/davisking/dlib.git
cd dlib && mkdir build && cd build
cmake-gui ..

with options

CMAKE_INSTALL_PREFIX /usr/local
CUDA 9.2 + cuDNN 7.1.4

generate

Found CUDA: /usr/local/cuda (found suitable version "9.2", minimum required is "7.5")
Looking for cuDNN install...
Found cuDNN: /usr/local/cuda/lib64/libcudnn.so
Building a CUDA test project to see if your compiler is compatible with CUDA...
Checking if you have the right version of cuDNN installed.
Enabling CUDA support for dlib. DLIB WILL USE CUDA
C++11 activated.

make and install

make -j8
sudo make install

output

[100%] Linking CXX static library libdlib.a
[100%] Built target dlib

generate static library libdlib.a

CMakeLists.txt

find_package(dlib REQUIRED)

if(MSVC)
set(dlib_LIBRARIES "C:/Program Files/dlib/lib/dlib.lib") # replace dlib::dlib
else()
endif(MSVC)
# ${dlib_INCLUDE_DIRS} and ${dlib_LIBRARIES} are deprecated, simply use target_link_libraries(your_app dlib::dlib)
MESSAGE( [Main] " dlib_INCLUDE_DIRS = ${dlib_INCLUDE_DIRS}")
MESSAGE( [Main] " dlib_LIBRARIES = ${dlib_LIBRARIES}") add_executable(demo demo.cpp)
#target_link_libraries(demo ${dlib_LIBRARIES})
target_link_libraries(demo dlib::dlib)

Reference

History

  • 20181127: created.

Copyright

ubuntu 16.04上源码编译dlib教程 | compile dlib on ubuntu 16.04的更多相关文章

  1. ubuntu 16.04源码编译OpenCV教程 | compile opencv on ubuntu 16.04

    本文首发于个人博客https://kezunlin.me/post/15f5c3e8/,欢迎阅读! compile opencv on ubuntu 16.04 Series Part 1: comp ...

  2. ubuntu 16.04上源码编译opengv | compile opengv on ubuntu 16.04

    本文首发于个人博客https://kezunlin.me/post/1e5d14ee/,欢迎阅读! compile opengv on ubuntu 16.04 Series compile open ...

  3. Ubuntu 16.04上源码编译Poco并编写cmake文件 | guide to compile and install poco cpp library on ubuntu 16.04

    本文首发于个人博客https://kezunlin.me/post/281dd8cd/,欢迎阅读! guide to compile and install poco cpp library on u ...

  4. Ubuntu 16.04上源码编译和安装pytorch教程,并编写C++ Demo CMakeLists.txt | tutorial to compile and use pytorch on ubuntu 16.04

    本文首发于个人博客https://kezunlin.me/post/54e7a3d8/,欢迎阅读最新内容! tutorial to compile and use pytorch on ubuntu ...

  5. ubuntu 16.04上源码编译libjpeg-turbo和使用教程 | compile and use libjpeg-turbo on ubuntu 16.04

    本文首发于个人博客https://kezunlin.me/post/9f626e7a/,欢迎阅读! compile and use libjpeg-turbo on ubuntu 16.04 Seri ...

  6. ubuntu 16.04上源码编译glog和gflags 编写glog-config.cmake和gflags-config.cmake | compile glog and glags on ubuntu 16.04

    本文首发于个人博客https://kezunlin.me/post/977f5125/,欢迎阅读! compile glog and glags on ubuntu 16.04 Series comp ...

  7. ubuntu 16.04上源码编译和安装cgal并编写CMakeLists.txt | compile and install cgal on ubuntu 16.04

    本文首发于个人博客https://kezunlin.me/post/39ab7ed9/,欢迎阅读最新内容! compile and install cgal on ubuntu 16.04 Guide ...

  8. ubuntu 14.04上源码编译安装php7

    wget https://downloads.php.net/~ab/php-7.0.0alpha2.tar.bz2 //用winscp把下载好的文件上传到网站中 tar jxf php-7.0.0a ...

  9. ubuntu上源码编译安装mysql5.7.27

    一.查看操作系统环境和目录结构,并创建mysql用户和组,以及规划安装mysql所需要的目录. #cat /etc/issue 查看发行版本信息: #cat  /proc/version 查看正在运行 ...

随机推荐

  1. oracle中创建用户、角色、权限简单使用

    Oracle关于用户.权限.角色简单使用 创建数据库用户(在system用户下)create user 用户名 identified by 密码; 授权grant 权限名 to 用户名; 查看当前用户 ...

  2. LeetCode108——Convert Sorted Array to Binary Search Tree

    题目: Given an array where elements are sorted in ascending order, convert it to a height balanced BST ...

  3. java大数运算(讲解)

    在算法竞赛或者面试中我们经常遇到大数问题,例如求一个很大的阶层,大数加法等等. 住在这种情况下我们用常规解法(使用long long或long long int)肯定是不行的, 而我们自己用c/c++ ...

  4. 中国大学MOOC-数据结构与算法实战 P6 括号匹配 (15 分)

    检查一段C语言代码的小括号( ). 中括号 [ ] 和大括号{ } 是否匹配. 输入格式: 在一行中输入一段C语言代码,长度不超过1000个字符(行末以换行符结束). 输出格式: 第一行输出左括号的数 ...

  5. The usage of Markdown---表格

    更新时间:2019.09.14   谈到怎么在Markdown中插入表格,其实只要熟知以下几点就可以了: 使用管道符|进行内容的分割 使用冒号:和连号符-表示表格内容的对齐情况,连号符-在中间,冒号: ...

  6. java迭代器 常用

    19 //使用迭代器遍历ArrayList集合 20 Iterator<String> listIt = list.iterator(); 21 while(listIt.hasNext( ...

  7. Dockerfile 定制镜像

    从上一篇文章中我们可以了解到,镜像的定制实际上就是定制每一层所添加的配置.文件等信息,但是命令毕竟只是命令,每次定制都得去重复执行这个命令,而且还不够直观,如果我们可以把每一层修改.安装.构建.操作的 ...

  8. 百度ERNIE 2.0强势发布!16项中英文任务表现超越BERT和XLNet

    2019年3月,百度正式发布NLP模型ERNIE,其在中文任务中全面超越BERT一度引发业界广泛关注和探讨. 今天,经过短短几个月时间,百度ERNIE再升级.发布持续学习的语义理解框架ERNIE 2. ...

  9. Net Framework,Net Core 和 Net Standard 区别

    前几天我在一个群里看到有关这方面的讨论,最后感觉讨论的不是很清晰,有幸的是我们的项目去年就开始迁移NetCore的调研了,我个人多多少少也是有过这方面的研究.下面我将说一下我自己对着三个的认识如果有不 ...

  10. python:__name__的使用

    1.python中__name__是什么意思? 很多python的初学者可能都会遇到一个问题:__name__是什么意思? 在刚开始学习python的时候,我们总会看到这样一句代码: if __nam ...