简体   繁体   English

Visual Studio不在KinectBridgeWithOpenCVBasics D2D C ++示例中使用其他包含目录,但在其他解决方案中使用。

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

I'm working on adding some openCV features to a couple projects that use the Kinect and openGL/freeGLUT. 我正在为使用Kinect和openGL / freeGLUT的几个项目添加一些openCV功能。 I have downloaded and installed OpenCV using the pre-built libraries and successfully run a simple sample. 我已经使用预构建的库下载并安装了OpenCV,并成功运行了一个简单的示例。 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. 现在,我想使用Kinect for Windows Developer Toolkit中的Kinect Bridge with OpenCV Basics示例 ,以更好地了解如何在Kinect中使用OpenCV。 I downloaded the sample into my projects folder, opened the solution in visual studio and built it. 我将样本下载到我的项目文件夹中,在Visual Studio中打开解决方案并进行构建。 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 错误1错误C1083:无法打开包含文件:'opencv2 / core / core.hpp':没有这样的文件或目录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 错误2错误C1083:无法打开包含文件:'opencv2 / core / core.hpp':无此类文件或目录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. 我将其他OpenCV项目使用的属性表添加到了该属性表中,但是仍然存在错误。 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. 似乎唯一可行的方法是在#include语句中指定完整的绝对文件路径。 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. 我想避免这样做,因为Visual Studio希望我更改项目中使用的每个文件(包括openCV标头文件)中的每个#include。 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. 我尝试使用的include目录和#includes与其他项目中的相同。 I'm using Visual Studio 2010 on Windows 7 x64 based system. 我在基于Windows 7 x64的系统上使用Visual Studio 2010。

Why would the additional include directory work for other projects, but not this one? 为什么附加的include目录可用于其他项目,但不适用于其他项目?

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. 通常,当我看到类似这样的内容时,在先前的include路径或其他选项之一中发现它是一个坏字符,这会使它后面的所有内容混乱。 I would take a look at your the command line page in the project configuration and see if you can spot anything amiss. 我将在项目配置中查看您的命令行页面,看看是否可以发现任何不正确的地方。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio 中用于 C++ 的其他包含目录 - Additional include directories in Visual Studio for C++ 如何使用D2D和类CD2DEllipse在C ++ MFC上绘制ELLIPSE - How to draw an ELLIPSE on C++ MFC using D2D and the class CD2DEllipse 使用D3D / D2D的设备定位像素阵列(从C ++ AMP)到窗口 - Device-located array of pixels (from C++ AMP) to a window using D3D / D2D 在 Visual Studio 中为 C++ 设置 UnitTest 项目并在主项目中包含其他目录的正确方法是什么? - What is the correct way to set up a UnitTest project for C++ in Visual Studio with additional include directories in the main Project? 什么是差异b / w包括VC ++目录选项和C ++中的附加包含目录 - > Visual Studio中的常规 - What is the diff b/w Includes in VC++ Directories options and Additional include directories in C++ -> General in Visual Studio Visual Studio还包括带有网络路径的目录 - Visual studio additional include directories with network path 包含在 Visual Studio C++ 中的文件/目录以使用 CUDA? - Files/directories to include in Visual Studio C++ to use CUDA? 将一批库和目录路径包含到“包含附加目录”Visual C++ 的任何方式 - Any way to include a batch of Library and Directory paths to "Include Additional Directories" Visual C++ D2D锐化效果 - D2D Sharpen Effect Visual Studio 中的 CMake 项目:如何添加额外的包含和库目录? - CMake project in Visual Studio: How to add additional include and library directories?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM