简体   繁体   中英

OpenCV and Visual Studio configuration

In Learning OpenCV , it mentions the following regarding configuring OpenCV and Visual Studio:

In Visual Studio, it is necessary to create a project and to configure the setup so that (a) the libraries highgui.lib, cxcore.lib, ml.lib, and cv.lib are linked and (b) the preprocessor will search the OpenCV … /opencv/*/include directories for header files. These “include” directories will typically be named something like C:/program files/opencv/cv/include, …/opencv/cxcore/include, … /opencv/ml/include, and … /opencv/otherlibs/ highgui.

How would I go about creating and configuring the project this way?

It is necessary to set environment variables first. You just need to add the location of the bin class to the directory path.(just add a semicolon and paste the path ). Then after creating a visual c++ console project you have to include needed include directories path to specific location.(If you need more explanation on that just add a comment)

You need to set the environment variables, and then set the projects properties (C++ and Linker) according to your OpenCV version and directories. See my step-bystep guide with instructions and a video:

http://devel-open.blogspot.com.ar/2012/12/opencv-visual-studio-2008.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM