本文首发于个人博客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. springboot security+redis+jwt+验证码 登录验证

    概述 基于jwt的token认证方案 验证码 框架的搭建,可以自己根据网上搭建,或者看我博客springboot相关的博客,这边就不做介绍了.验证码生成可以利用Java第三方组件,引入 <dep ...

  2. 解析fiddler返回的部分数据。

    1.通过抓包获取的数据,里面包含的哪些内容是需要我们去关注的? 2.首先上图. 3.图片说明: 此图片中是利用豆瓣API提供的接口实现返回数据.内容与抓包返回的内容格式一致 url:https://a ...

  3. Ubuntu 14.04 kylin 安装 OpenCV 2.4.9|3.0.0

    首先安装依赖 sudo apt-get -y install libopencv-dev sudo apt-get -y install build-essential checkinstall cm ...

  4. OptimalSolution(4)--字符串问题(1)简单

    一.判断两个字符串是否互为变形词 问题:给定两个字符串str1和str2,如果str1和str2中出现的字符种类一样且每种字符出现的次数也一样,那么str1与str2互为变形词. 举例:str1=“1 ...

  5. MybatisPlus3.X使用配置

    本文讲解了MyBatis-Plus在使用过程中的配置选项,其中,部分配置继承自MyBatis原生所支持的配置 基本配置 本部分配置包含了大部分用户的常用配置,其中一部分为 MyBatis 原生所支持的 ...

  6. MUI 混合开发移动app应用开发 --- app版本升级

    当我们的app开发完成之后,无可避免的以后会进行产品升级,那么我们希望在客户的手机上让app进行自动升级,可以分为自动升级和手动升级. 自动升级:一般在客户app第一次打开首页的时候. 手动升级:在a ...

  7. [Jupyter Notebook]Notebook添加Ancona虚拟环境

    1.首先安装ipykernel:conda install ipykernel 解决安装ipykernel权限报错问题 wangbin@Skyell_Cloud:~$ sudo chown -R wa ...

  8. [wcp部署]Linux(Ubuntu)安装部署WCP

    1.安装JAVA运行环境 配置环境变量及安装jdk mkdir /usr/local/java tar -zxvf jdk-8u31-linux-x64.gz #解压jdk包 mv jdk1.8.0_ ...

  9. 清华大学教学内核ucore学习系列(1) bootloader

    ucore是清华大学操作系统课程的实验内核,也是一个开源项目,是不可多得的非常好的操作系统学习资源 https://github.com/chyyuu/ucore_lab.git, 各位同学可以使用g ...

  10. [考试反思]1104csp-s模拟测试100: 终结

    这么好的整数场,就终结了我连续莫名考好的记录. 功德圆满了... 还是炸了啊.而且炸的还挺厉害(自己又上不去自己粘的榜单啦) 说实在的这场考试做的非常差劲.虽说分数不算特别低但是表现是真的特别差. T ...