- Install OPEN CV:
- Download open CV 2.1.0 from Source-Forge "OpenCV-2.1.0-win32-vs2008.exe".
- Install it to a folder (without any spaces in it), say "C:\OpenCV2.1\". This article will refer to this path as $openCVDir
- During installation, enable the option "Add OpenCV to the system PATH for all users.
- Open VC++ Directories configuration: Tools > Options > Projects and Solutions > VC++ Directories
- Choose "Show directories for: Include files"
- Add "$openCVDir\include\opencv"
- Choose "Show directories for: Library files"
- Add "$openCVDir\lib"
- Choose "Show directories for: Source files"
- Add "$openCVDir\src\cv"
- Add "$openCVDir\src\cvaux"
- Add "$openCVDir\src\cxcore"
- Add "$openCVDir\src\highgui"
3. Configure your project:
After you've created a project you'll need to add the OpenCV dependencies.
- Open Project Properties: Project > %projectName% Properties...
- Open Linker Input properties: Configuration Properties > Linker > Input
- Open the "..." window to edit "Additional Dependencies" and on each line put:
- "cv210.lib"
- "cxcore210.lib"
- "highgui210.lib"
- And any other lib file necessary for your project
- Your project should now build. If you get any errors try restarting Visual Studio and then doing a clean Rebuild