To set up a Visual Studio 2005 Project to compile OpenCV code: 1. Create a project 2. In the Solution Explorer window (probably upper right) right click on you project (NOT the solution!). 3. Click on "Properties" 4. Under "Configuration Properties"->"C/C++"->"General" Find the field "Additional Include Directories" 5. Click on it, and then on the button on the right with "..." in it. 6. Click the Folder icon to add an additional include directory. 7. Depending on what you need to do with OpenCV you might have to add several of these, but here are some good canidates: "C:\Program Files\OpenCV\cv\include" "C:\Program Files\OpenCV\cvaux\include" "C:\Program Files\OpenCV\otherlibs\highgui" "C:\Program Files\OpenCV\cvcore\include" 8. Click "ok" and navigate to "Configuration Properties"->"Linker"->"General" 9. Click on "Additional Library Directories" and then the "..." button. 10. Add the additional library directories: "C:\Program Files\OpenCV\lib" "C:\Program Files\OpenCV\bin" 11. Click "ok" and navigate to "Configuration Properties"->"Linker"->"Input" 12. Click on "Additional Dependencies" and the "..." button to add them 13. Add the libraries you'll need to use for your project. Some common ones are: cv.lib cvcam.lib highgui.lib cxcore.lib cvaux.lib 14. Note: Library dependencies are not surrounded by quotes, whereas all the other directory dependencies are. 15. Remember to have your "#include "cv.h"" etc. lines at the top of your cpp file. Running an OpenCV app after you've compiled. 1. Click on the Start Menu, and then Right click on "My computer" 2. Click on "Properties" 3. Click on the "Advanced" tab 4. Click on "Environment Variables" 5. If you have a "User" variable (top window) called "PATH", click Edit and put this exact string before the rest of what's there: C:\Program Files\OpenCV\bin; 6. If you do not have a "User" variable called "PATH", Click "New" and create one with this exact string as its value: C:\Program Files\OpenCV\bin 7. Click "Ok" to finalize the addition of the variable. Now your OpenCV app should look in the right place for the DLL's it needs at runtime.