Visual Studio not using additional include directories for KinectBridgeWithOpenCVBasics D2D C++ Sample, but does for other solutions.

StackOverflow https://stackoverflow.com/questions/22518437

Question

I'm working on adding some openCV features to a couple projects that use the Kinect and openGL/freeGLUT. I have downloaded and installed OpenCV using the pre-built libraries and successfully run a simple sample. Now I want to work with the Kinect Bridge with OpenCV Basics sample from the Kinect for Windows Developer Toolkit to get a better idea of how to use OpenCV with the Kinect. I downloaded the sample into my projects folder, opened the solution in visual studio and built it. I got the following errors:

Error 1 error C1083: Cannot open include file: 'opencv2/core/core.hpp': No such file or directory c:\users\justin\documents\visual studio 2010\projects\kinectbridgewithopencvbasics-d2d\OpenCVHelper.h 17

and

Error 2 error C1083: Cannot open include file: 'opencv2/core/core.hpp': No such file or directory c:\users\justin\documents\visual studio 2010\projects\kinectbridgewithopencvbasics-d2d\OpenCVFrameHelper.h 13

Initially I thought these errors were due to forgetting to specify the additional include directories. I added the same property sheet that my other OpenCV projects use to this one, but the errors remained. I tired copying the header files into the project folder: same thing. It seems like the only thing that works is specifying the full absolute file paths in the #include statements. I want to avoid doing this because visual studio wants me to change every #include in every file used in the project, including the openCV header files. I also tried shortening the name of my project folder in case the file path was too long (though I'm pretty sure that's more of an issue for the header file paths), but again no change.

The include directories and #includes that I'm trying to use are the same as in my other projects. I'm using Visual Studio 2010 on Windows 7 x64 based system.

Why would the additional include directory work for other projects, but not this one?

Était-ce utile?

La solution

Usually when I see something like this it turns out to be a bad character in one of the prior include paths or other options that's messing everything up after it. I would take a look at your the command line page in the project configuration and see if you can spot anything amiss.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top