Ultra-detailed configuration and windows installation opencv opencv in VS

Downloaded from the official website opencv, links https://opencv.org/releases/ , get exe files  ;

Unpack opencv folder;

Set system environment variables, a new variable named OPENCV_DIR and enter the path opencv, the following example:

The subsequent configuration path when visual studio uses the static link library for use has been completed;

When you want to use the dynamic link library DLL form, edit the path variable, the new% OPENCV_DIR% \ bin

The above installation procedure is completed.

 

Next, the configuration in VS:

The method is by creating a new project property sheet, you can later import the project through the property sheet without the need to configure again.

Create an empty C ++ project;

2 new project attribute management attribute table, as the following

Double-click the new OpenCVDebugX64 project property sheet, set

Keep the project property sheet file after setup is complete.

Releas property is also set to.

After setting the compiled file can be run without having to copy the dll file to the run directory.

But to be supporting the package is publisher associated dll program to run, this part can "edit post-build events" in.

Published 18 original articles · won praise 8 · views 10000 +

Guess you like

Origin blog.csdn.net/zengshaoqing/article/details/105046277