ai:dlib
差分
このページの2つのバージョン間の差分を表示します。
次のリビジョン | 前のリビジョン | ||
ai:dlib [2019/01/06 00:21] – 作成 oga | ai:dlib [2019/01/06 02:22] (現在) – [build 手順] oga | ||
---|---|---|---|
行 1: | 行 1: | ||
====== dlib ====== | ====== dlib ====== | ||
+ | |||
+ | |||
+ | * [[http:// | ||
+ | |||
===== build 手順 ===== | ===== build 手順 ===== | ||
+ | |||
+ | cmake を使った build では Release と Debug それぞれ別の Project を作る必要があります。Visual Studio 上から切り替えできません。 | ||
+ | |||
+ | === (1) Release build === | ||
+ | |||
+ | ソースコードを展開したフォルダを dlib-19.13 とします。 | ||
+ | |||
+ | < | ||
+ | > cd dlib-19.13 | ||
+ | > mkdir build64 | ||
+ | > cd build64 | ||
+ | > cmake -G " | ||
+ | > start Project.sln | ||
+ | </ | ||
+ | |||
+ | Visual Studio が起動したら、Configuration を " | ||
+ | |||
+ | |||
+ | === (2) Debug build === | ||
+ | |||
+ | < | ||
+ | > cd dlib-19.13 | ||
+ | > mkdir build64d | ||
+ | > cd build64d | ||
+ | > cmake -G " | ||
+ | > start Project.sln | ||
+ | </ | ||
+ | |||
+ | Visual Studio が起動したら、Configuration を " | ||
+ | |||
+ | |||
+ | === (3) config.h の copy === | ||
+ | |||
+ | build したフォルダ dlib-19.13/ | ||
+ | |||
+ | lib 作成時の config と、application build 時の config は必ず一致していなければなりません。 | ||
+ | |||
+ | |||
+ | |||
+ | === (4) include / lib path === | ||
+ | |||
+ | * include path は **dlib-19.13** を指定します。include は下記のように " | ||
+ | |||
+ | <code cpp> | ||
+ | # | ||
+ | </ | ||
+ | |||
+ | |||
+ | * link する lib file は下記の通り。 | ||
+ | * Release: **dlib-19.13/ | ||
+ | * Debug: **dlib-19.13/ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== x86 で build する場合 ===== | ||
+ | |||
+ | * x86 では CUDA が使えないので、必ず DLIB_USE_CUDA を OFF にする必要があります。 | ||
+ | * x64 と x86 の両対応を行いたい場合は config.h を下記のように書き換えます。もしくは CUDA が不要なら x64 でも OFF 。 | ||
+ | |||
+ | <code cpp> | ||
+ | ~ | ||
+ | #ifdef _M_X64 | ||
+ | # define DLIB_USE_CUDA | ||
+ | #endif | ||
+ | ~ | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
ai/dlib.txt · 最終更新: 2019/01/06 02:22 by oga