win10 + vs2013 + OpenCV2.4.13 configuration

============================
Step1: First, configure the system environment variables:
(1) Right-click this computer-> Properties, click Advanced System environment variables, click on environment variables, first of all in the user variables, edit Path, add OpenCV bin path ... \ opencv \ build \ x64 \ vc12 \ bin (Note: if it is x86, then change x64 to x86) Then edit the Path in the system variables, and add the OpenCV bin path ... \ opencv \ build \ x64 \ vc12 \ bin (Note: if it is x86, change x64 to x86).

Step2: Configure OpenCV at one time in vs (Note: This configuration is only valid for the project. When creating another project, it needs to be reconfigured. For permanent configuration, see Step3):
(1) Open the project;
(2) Click From the view in the menu bar, select the property page;
(3) Click the VC ++ directory to edit the included directory and library directory. The directory paths included in OpenCV2.4.13 are: ... \ opencv \ build \ include, ... \ opencv \ build \ include \ opencv, ... \ opencv \ build \ include \ opencv2.
The path of the library directory is: ... \ opencv \ build \ x64 \ vc12 \ lib (Note: If the active solution platform is x86, change x64 to x86);
(4) Click the linker- > input-> additional dependencies, input:
opencv_ml2413d.lib
opencv_calib3d2413d.lib
opencv_contrib2413d.lib
opencv_core2413d.lib
opencv_features2d2413d.lib
opencv_flann2413d.lib
opencv_gpu2413d.lib
opencv_highgui2413d.lib
opencv_imgproc2413d.lib
opencv_legacy2413d.lib
opencv_objdetect2413d.lib
opencv_ts2413d.lib
opencv_video2413d.lib
opencv_nonfree2413d.lib
opencv_ocl2413d.lib
opencv_photo2413d.lib
opencv_stitching2413d.lib
opencv_superres2413d.lib
opencv_videostab2413d.lib
(5) Close vs2013, and then reopen.
Step3: Configure OpenCV permanently in vs:
(1) Open the project;
(2) Click the view in the menu bar, select other windows-> property manager;
(3) If it is in DEBUG mode, left click DEBUG | x64, If it is in Release mode, left-click on Release | x64 (here DEBUG and x64 are used as an example, Release is the same reason), right-click on Microsoft.Cpp.x64.user-> Properties.
(4) For the remaining steps, please refer to (3)-(5) in Step2

Published 36 original articles · won praise 1 · views 6384

Guess you like

Origin blog.csdn.net/qq_34291583/article/details/96601618