- Download OpenCV and extract it to desired directory, for example
D:\opencv. - Set up environment variables for Windows:
OPENCV_DIR=D:\opencv\build- Add
%OPENDC_DIR%\x86\vc12\bintoPATH
- Set up properties of MicroSoft Visual Studio project (Only works for OpenCV 3,
need to add more files in step iv for OpenCV 2):
- Right click on project name in
Solution Explorerand chooseProperties. - In
Configuration Properties -> C/C++ -> General -> Additional Include Directories, add$(OPENCV_DIR)/includeto it. This will add OpenCV header files into compiler's search directories. - In
Configuration Properties -> Linker -> General -> Additional Library Directories, add$(OPENCV_DIR)/x86/vc12/binand$(OPENCV_DIR)/x86/vc12/libto it. - In
Configuration Properties -> Linker -> Input -> Additional Dependencies, addopencv_ts300.libandopencv_world300.libinto it (Useopencv_ts300d.libandopencv_world300d.libfor Debug).
- Right click on project name in
Created
December 7, 2015 05:33
-
-
Save mikkkee/f319f6f83355b9159f88 to your computer and use it in GitHub Desktop.
hecklist for setting up MicroSoft Visual Studio to work with OpenCV
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment