【openFrameworks】Windows環境でofxFaceTrackerのビルド時にエラーが起こる

Windows環境でopenFrameworksとofxFaceTrackerを用いたアプリケーションを作成しようとしたところ、ビルドに失敗してだいぶ困ったのでメモ。
主なエラーメッセージは下記。

ContourFinder.obj : error LNK2019: 未解決の外部シンボル "float __cdecl ofxCv::trackingDistance(class cv::Rect_<int> const &,class cv::Rect_<int> const &)" (?trackingDistance@ofxCv@@YAMABV?$Rect_@H@cv@@0@Z) が関数 "public: virtual class std::vector<unsigned int,class std::allocator<unsigned int> > const & __thiscall ofxCv::Tracker<class cv::Rect_<int> >::track(class std::vector<class cv::Rect_<int>,class std::allocator<class cv::Rect_<int> > > const &)" (?track@?$Tracker@V?$Rect_@H@cv@@@ofxCv@@UAEABV?$vector@IV?$allocator@I@std@@@std@@ABV?$vector@V?$Rect_@H@cv@@V?$allocator@V?$Rect_@H@cv@@@std@@@4@@Z) で参照されました。
ObjectFinder.obj : error LNK2001: 外部シンボル ""float __cdecl ofxCv::trackingDistance(class cv::Rect_<int> const &,class cv::Rect_<int> const &)" (?trackingDistance@ofxCv@@YAMABV?$Rect_@H@cv@@0@Z)" は未解決です。

環境

Windows 8.1
Visual Studio Community 2015
openFrameworks 0.9.2
ofxFaceTracker 1.1

解決策

はじめに、プロジェクトのプロパティを開く。

f:id:taka_say:20160224200251p:plain

構成プロパティ → C/C++ → 出力ファイル

を選び、オブジェクトファイル名の値を、

$(IntDir)

から

$(IntDir)/%(RelativeDir)/

に書き換える。

f:id:taka_say:20160224200256p:plain

これで無事実行できるようになるはず。

参考

ofxFaceTracker error on windows - beginners - openFrameworks

Many thanks!