I have asked a similar question on How to link and use OpenCV headers?, but no luck so far. So I decided to ask a new, more specific question.
What OpenCV-specific folders or files do I need to include in my C++ project — and how I might include them? I have installed OpenCV 2.4.0 on my C:\ drive. I’ve looked at the tutorials in openCV’s website, but they are for an older version (OpenCV 2.1) and refer to non-existent files like objdetect.hpp (for example).
See http://docs.opencv.org/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.html#windows-visual-studio-how-to
Add these to your stdafx.h
Assuming you have set OPENCV_DIR to the place you put opencv eg.
OPENCV_DIR=c:\opencv2.4\opencvThen set the VC++ directories in project settings to
Include add
$(OPENCV_DIR)\includeand to Library add$(OPENCV_DIR)\libThen in the “linker Input” add opencv_core240.lib (opencv_core240D.lib for debug) opencv_imgproc240.lib and opencv_highgui240.lib etc