今までOpenCV 2.1でビルドしてきたプロジェクトをOpenCV 2.2に切り替えてみた.
ビルドを通すまで,変更した点が何点かあったので,そこを書いていく.
ちなみにvcprojファイルに設定を追記するGUIツールを公開したので,そちらも参照してみて下さい.
-#include <cv.h> -#include <cxcore.h> -#include <highgui.h> +#include <opencv.hpp>
C:\OpenCV2.2\build\include\opencv;C:\OpenCV2.2\build\include\opencv2;C:\OpenCV2.2\build\include
C:\OpenCV2.2\build\lib\Debug
C:\OpenCV2.2\build\lib\Release
opencv_core220d.lib opencv_imgproc220d.lib opencv_highgui220d.lib opencv_calib3d220d.lib
opencv_core220.lib opencv_imgproc220.lib opencv_highgui220.lib opencv_calib3d220.lib
Name="VCCLCompilerTool" Optimization="0" -AdditionalIncludeDirectories="C:\OpenCV2.1\include\opencv" +AdditionalIncludeDirectories="C:\OpenCV2.2\include\opencv;C:\OpenCV2.2\build\include;C:\OpenCV2.2\include\opencv2" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
Name="VCCLCompilerTool" Optimization="2" EnableIntrinsicFunctions="true" -AdditionalIncludeDirectories="C:\OpenCV2.1\include\opencv" +AdditionalIncludeDirectories="C:\OpenCV2.2\include\opencv;C:\OpenCV2.2\build\include;C:\OpenCV2.2\include\opencv2" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
Name="VCLinkerTool" -AdditionalDependencies="cv210d.lib cxcore210d.lib highgui210d.lib" +AdditionalDependencies="opencv_imgproc220d.lib opencv_core220d.lib opencv_highgui220d.lib opencv_calib3d220d.lib" LinkIncremental="2" -AdditionalLibraryDirectories="C:\OpenCV2.1\build\lib\Debug" +AdditionalLibraryDirectories="C:\OpenCV2.2\build\lib\Debug"
Name="VCLinkerTool" -AdditionalDependencies="cv210.lib cxcore210.lib highgui210.lib" +AdditionalDependencies="opencv_imgproc220.lib opencv_core220.lib opencv_highgui220.lib opencv_calib3d220.lib" LinkIncremental="1" -AdditionalLibraryDirectories="C:\OpenCV2.1\build\lib\Release" +AdditionalLibraryDirectories="C:\OpenCV2.2\build\lib\Release"
参考URL:【OpenCV2.2】ライブラリ構成(*.lib,*.hなど) 画像処理ソリューション
参考tweet:http://twitter.com/#!/dandelion1124/statuses/12104214863937536