Skip to content

Tutorial for Windows

Takuya Takeuchi edited this page Jun 1, 2019 · 21 revisions

Requirements

  • dlib
  • 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
  • .NET Core 2.0

Preparations

git clone https://github.com/takuya-takeuchi/DlibDotNet
cd DlibDotNet
Initialize.bat

How to build DlibDotNet.Native

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" -T host=x64 ^
      ..
  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

How to build DlibDotNet.Native.Dnn

Build

  1. Open DlibDotNet\src\DlibDotNet.Native.Dnn in command prompt
  2. Type the following code in a console:
mkdir build
cd build
cmake -G "Visual Studio 15 2017 Win64" -T host=x64 ^
      ..
  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

How to build DlibDotNet by Visual Studio

Preparations

  1. Refer Prerequisites for .NET Core on Windows](https://docs.microsoft.com/en-us/dotnet/core/windows-prerequisites?tabs=netcore2x)

Build

  1. Open DlibDotNet\DlibDotNet.sln in Visual Studio
  2. Do build command for DlibDotNet project

How to build DlibDotNet by Command Line

Preparations

  1. Install .NET Core 2.0 by following the official page

Build

  1. Open DlibDotNet\src\DlibDotNet in console
  2. Type the following code in a console:
dotnet build -c Release

Or

dotnet build -c Debug