Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

First create an environment variable for Opencv build path:

Name: OPENCV_BUILD Value: Your Path to the opencv build folder (ex. C:\Opencv\build)

Add vs10 bin path to the "Path" variable (system environment variable) by adding the following, seperated by semi-colon:

%OPENCV_BUILD%\x86\vc10\bin

Use x64 if your Visual Studio is 64-bit.

Add a "Property Sheet" to your Visual Studio project with the following (this is for Debug, for release add similar libs not ending with 'd': ex. opencv_highgui245.lib instead of opencv_highgui245d.lib):

C/C++ AdditionalIncludeDirectories: $(OPENCV_BUILD)\include Linker->General AdditionalLibraryDirectories: $(OPENCV_BUILD)\x86\vc10\lib

Linker->Input AdditionalDependencies: opencv_core245d.lib;opencv_imgproc245d.lib;opencv_highgui245d.lib;opencv_ml245d.lib;opencv_objdetect245d.lib;opencv_video245d.lib;opencv_features2d245d.lib;opencv_calib3d245d.lib;opencv_contrib245d.lib;opencv_flann245d.lib;opencv_gpu245d.lib;opencv_haartraining_engined.lib;opencv_legacy245d.lib;opencv_nonfree245d.lib;opencv_photo245d.lib;opencv_stitching245d.lib;opencv_superres245d.lib;opencv_videostab245d.lib

First create an environment variable for Opencv build path:

Name: OPENCV_BUILD Value: Your Path to the opencv build folder (ex. C:\Opencv\build)

Add vs10 bin path to the "Path" variable (system environment variable) by adding the following, seperated by semi-colon:

%OPENCV_BUILD%\x86\vc10\bin

Use x64 if your Visual Studio is 64-bit.

Add a "Property Sheet" to your Visual Studio project with the following (this is for Debug, for release add similar libs not ending with 'd': ex. opencv_highgui245.lib instead of opencv_highgui245d.lib):

C/C++ AdditionalIncludeDirectories: $(OPENCV_BUILD)\include $(OPENCV_BUILD)\include

Linker->General AdditionalLibraryDirectories: $(OPENCV_BUILD)\x86\vc10\lib

Linker->Input AdditionalDependencies: opencv_core245d.lib;opencv_imgproc245d.lib;opencv_highgui245d.lib;opencv_ml245d.lib;opencv_objdetect245d.lib;opencv_video245d.lib;opencv_features2d245d.lib;opencv_calib3d245d.lib;opencv_contrib245d.lib;opencv_flann245d.lib;opencv_gpu245d.lib;opencv_haartraining_engined.lib;opencv_legacy245d.lib;opencv_nonfree245d.lib;opencv_photo245d.lib;opencv_stitching245d.lib;opencv_superres245d.lib;opencv_videostab245d.lib