Visual Studio 2013未找到包含路径

时间:2017-09-29 18:49:08

标签: c++ opencv visual-studio-2013

我试图将opencv库链接到项目,但我一直收到错误

error C1083: Cannot open include file: 'opencv2/core.hpp': No such file or directory

我有一个名为OPENCV_DIR的路径变量,我使用cygwin确认了正确文件夹的路径。我还确认文件core.hpp存在于我的include目录中名为opencv2的文件夹中。

我为Visual Studios创建了两个属性表,一个用于调试一个用于发布,另外两个具有相同的说明如下:

c++>general>additional include directories: $(OPENCV_DIR)\..\..\include

Linker>general>additional library directories: $(OPENCV_DIR)\lib

Linker>input>additional dependencies: 
IlmImfd.lib
libjasperd.lib
libpngd.lib
libjpegd.lib
libtiffd.lib
libwebpd.lib
opencv_calib3d300d.lib
opencv_core300d.lib
opencv_features2d300d.lib
opencv_flann300d.lib
opencv_hal300d.lib
opencv_highgui300d.lib
opencv_imgcodecs300d.lib
opencv_imgproc300d.lib
opencv_ml300d.lib
opencv_objdetect300d.lib
opencv_photo300d.lib
opencv_shape300d.lib
opencv_stitching300d.lib
opencv_superres300d.lib
opencv_ts300d.lib
opencv_video300d.lib
opencv_videoio300d.lib
opencv_videostab300d.lib
zlibd.lib
ippicvmt.lib
comctl32.lib
vfw32.lib

我已经在cygwin中确认$OPENCV_DIR/../../include$OPENCV_DIR/lib会导致正确的目录,尽管它不接受语法$(OPENCV_DIR)\..\..\include$(OPENCV_DIR)\lib,奇怪的是

我尝试过不使用路径变量OPENCV_DIR并为Visual Studios提供完整的文件路径。我也尝试使用cygwin语法而不是括号和反斜杠语法,再次无济于事。

通过阅读有类似问题的人的线程,讨论了使用64位版本的opencv和32位编译器导致问题。我正在构建一个win32应用程序,但我只能找到一个x64版本的opencv?这是问题吗?

有人能告诉我为什么Visual Studios无法在属性表中的目录中找到此文件吗?

0 个答案:

没有答案