Skip to content

Tutorial for Windows

Takuya Takeuchi edited this page Oct 8, 2017 · 21 revisions

Requirements

  • dlib
  • giflib
  • CMake
    • 3.0 or higher
    • If you do not want to add CMake path to environment variable, you must type fullpath of CMake when build library.
  • Visual Studio
    • Recommended 2017

How to build dlib

DlibDotNet.Native requires dlib.lib. You can refer official page

How to build DlibDotNet.Native

Preparations

  1. Clone Dlib.Net repository to any directory
  2. Download dlib package from officail site
  3. Download giflib package from dowload page
  4. Extract dlib and giflib files to any directory
  5. Modify giflib files
    • Replace #include <unistd.h> to #include <io.h> in all files
  6. Add the following environment variable to system
    • DLIB_PATH
      • Ex. D:/Works/Lib/DLib/19.7
      • You must NOT include dlib directory. You should use D:/Works/Lib/DLib/19.7 rather than D:/Works/Lib/DLib/19.7/dlib
    • GIFLIB_PATH
      • Ex. D:/Works/Lib/giflib/5.1.4

Build

  1. Open DlibDotNet\src\DlibDotNet.Native in command prompt
  2. Type the following code in a console:
mkdir build
cd build
cmake -G "Visual Studio 15 2017 Win64" ..
  1. Type the following code in a console:
cmake --build . --config Release

Or

cmake --build . --config Debug
  1. Binary files will be in build\Release or build\Debug

Clone this wiki locally