Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/opencv/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual c++ 使用本地构建/自构建OpenCV的OpenCV项目的正确包含目录在哪里?_Visual C++_Opencv_Visual Studio 2012 - Fatal编程技术网

Visual c++ 使用本地构建/自构建OpenCV的OpenCV项目的正确包含目录在哪里?

Visual c++ 使用本地构建/自构建OpenCV的OpenCV项目的正确包含目录在哪里?,visual-c++,opencv,visual-studio-2012,Visual C++,Opencv,Visual Studio 2012,我正在试着调试。就是放弃,而是在失败项目所在的同一台机器上构建OpenCV 这就是我现在正在努力做的 其中一个重要步骤是通过打开项目的属性页,导航到Configuration Properties->C/C++->General->additional include directories,将其他include目录添加到项目属性页。建议我使用预构建的发行版添加目录C:\OpenCV2.4.6\build\include,实际上,在该目录中有子目录opencv和OpenCV2。我的项目(与大多数

我正在试着调试。就是放弃,而是在失败项目所在的同一台机器上构建OpenCV

这就是我现在正在努力做的

其中一个重要步骤是通过打开项目的属性页,导航到
Configuration Properties->C/C++->General->additional include directories
,将其他include目录添加到项目属性页。建议我使用预构建的发行版添加目录
C:\OpenCV2.4.6\build\include
,实际上,在该目录中有子目录
opencv
OpenCV2
。我的项目(与大多数OpenCV项目一样)需要的文件之一是行中的
highgui.hpp

#include "opencv2/highgui/highgui.hpp"
在预构建的OpenCV发行版中,
highgui.hpp
最终位于
C:\OpenCV2.4.6\build\include\OpenCV2\highgui
中,因此由于附加的include目录,它在编译时被正确拾取

使用CMake生成并使用Visual Studio 2012在我的机器上构建了最新版本的OpenCV(尽管如此),我找不到
highgui.hpp
。它不在
C:\Users\timregan\Documents\GitHub\opencv\build\include
中(实际上,其中既没有子目录
opencv
也没有
opencv2
)。它位于C:\opencv-2.4\modules\highgui\include\opencv2\highgui中

为了生成并将其正确放置在我的机器上,我省略了什么步骤、标志等?为什么在我生成并构建opencv之后,
C:\Users\timregan\Documents\GitHub\opencv\build\include
中完全缺少
opencv
opencv2
子目录


(注意,我正在Windows 8机器上使用CMake 2.8.12和Visual Studio 2012。)

打开Visual Studio解决方案,右键单击install project,然后构建。包含文件应出现在
C:\Users\timregan\Documents\GitHub\opencv\selfbuild\install
打开visual studio解决方案,右键单击install project,然后单击build。包含文件应出现在
C:\Users\timregan\Documents\GitHub\opencv\selfbuild\install