OpenCV-找不到头文件 [英] Opencv - Can't find header files

查看:151
本文介绍了OpenCV-找不到头文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用opencv开始开发.问题是,直到现在,我几乎无法设置opencv cos,但找不到其头文件.

I'm trying to start development with opencv. The problem is, until now I coul barely setup the opencv cos I cant find its header files.

我对此主题进行了一些研究,但在以下一些链接中,没有一个是真正有用的:

I made some research regarding to this subject but none of them were realy helpful, below some of the links:

  1. opencv2包含文件在哪里?

http://answers.opencv.org/question/14712/opencvhpp-not-in-opencv2/

我使用CMAKE GUI构建了文件-使用MVS 11 x64调试和发布了代码.编译成功,但我找不到lib和dll,但是在任何地方都没有标头.

I made the built the files using CMAKE GUI - Built the code with MVS 11 x64 both debug and release. The compilation suceeded and I cant found libs and dlls, but no headers at all anywhere.

查看图片:

Opencv2文件夹

Opencv2 folder

本地文件夹

所以,现在我问,我在这里想念什么?

So, now I ask, What am I missing here?

感谢您的帮助

编辑一个:

那是你的意思吗?

编辑两个:

我在opencv的源代码中发现了一些标头,每个标头都位于特定的文件夹中,例如core,highgui等-就是这样吗?还是还是有问题?cos,我认为我应该在构建中使用标头,而不在源中使用..

I found some headers inside the source of opencv, and each of them is inside an specific folder, like core, highgui and so on - that is it? or something still wrong? cos I thought I should take the headers on the build, no on the source..

推荐答案

将"opencv/build/include"追加到您的包含路径.

append "opencv/build/include" to your include path.

如果您使用cmake自己构建了opencv库,请确保您运行INSTALL项目,并添加安装文件夹.

if you built the opencv libraries yourself using cmake, make sure you run the INSTALL project, and add the folder, where it installed to.

运行 make install 时,所需的包含文件将复制到由makefile确定的单个目录中,并可能显示为输出的一部分.

When you run make install then the include files that you need are copied to a single directory determined by the makefiles and probably displayed as a part of the output.

这篇关于OpenCV-找不到头文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆