I have created a new project (without code) that uses OpenCV.
I the project properties I set the requirements like below:
library directory:
- C:\OpenCV-2.2.0\lib\Debug
include directories:
- C:\OpenCV-2.2.0\include\opencv
- C:\OpenCV-2.2.0\include\opencv2
- C:\OpenCV-2.2.0\include
The first lines of code :
#pragma comment(lib, "opencv_core230d.lib")
#pragma comment(lib, "opencv_highgui230d.lib")
#pragma comment(lib, "opencv_video230d.lib")
#pragma comment(lib, "opencv_ml230d.lib")
#pragma comment(lib, "opencv_legacy230d.lib")
#pragma comment(lib, "opencv_imgproc230d.lib")
When I built my project I got no error but when I include the <cv.h> file, unresolved external errors appear.
To solve my problem any guide may help me.
You haven added the src directory files. Look at this page: http://opencv.willowgarage.com/wiki/VisualC%2B%2B_VS2010
You need to add these folders:
Source Directories… add: ‘C:\OpenCV2.1\src\cv; C:\OpenCV2.1\src\cvaux; C:\OpenCV2.1\src\cxcore; C:\OpenCV2.1\src\highgui; C:\OpenCV2.1\src\ml;’