致命错误C1083:不能打开包含文件:'opencv2/core。没有这样的文件或目录。

时间:2022-05-16 18:12:05

I keep getting this error "Fatal error C1083: Cannot open include file: 'opencv2/core.hpp': No such file or directory". I am using Visual Studio 2012 and OpenCV 3.0 and opencv2/core.hpp is in OpenCV 3 so I'm not sure what the problem is. I have set up the additional include directories in the debug property pages. Any idea what my problem is?

我一直得到这个错误"致命错误C1083:不能打开包含文件:'opencv2/core。没有这样的文件或目录。我正在使用Visual Studio 2012和OpenCV 3.0和opencv2/core。hpp在OpenCV 3所以我不确定问题是什么。我已经在调试属性页中设置了附加的目录。知道我的问题是什么吗?

C/C++-> General -> Additional include dependencies -> C:/opencv/build; C:/opencv/build/include; C:/opencv/build/include/opencv; C:/opencv/modules/core/include; C:/opencv/modules/imgproc/include; C:/opencv/modules/flann/include; C:/opencv/modules/highgui/include; C:/opencv/modules/features2d/include; C:/opencv/modules/calib3d/include; C:/opencv/modules/ml/include; C:/opencv/modules/video/include; C:/opencv/modules/objdetect/include; C:/opencv/modules/contrib/include; C:/opencv/modules/nonfree/include; C:/opencv/modules/photo/include; C:/opencv/modules/legacy/include; C:/opencv/modules/gpu/include; C:/opencv/modules/stitching/include; C:/opencv/modules/ts/include; C:/opencv/modules/videostab/include; %(AdditionalIncludeDirectories)

C/ c++ ->通用->附加包括依赖-> C:/opencv/build;C:/ opencv /构建/包括;C:/ opencv /构建/ include / opencv;C:/ opencv /模块/核心/包括;C:/ opencv /模块/ imgproc /包括;C:/ opencv /模块/ flann /包括;C:/ opencv /模块/ highgui /包括;C:/ opencv /模块/ features2d /包括;C:/ opencv /模块/ calib3d /包括;C:/ opencv /模块/毫升/包括;C:/ opencv /模块/视频/包括;C:/ opencv /模块/ objdetect /包括;C:/ opencv /模块/ contrib /包括;C:/ opencv /模块/非免费/包括;C:/ opencv /模块/照片/包括;C:/ opencv /模块/遗留/包括;C:/ opencv /模块/ gpu /包括;C:/ opencv /模块/缝合/包括;C:/ opencv /模块/ ts /包括;C:/ opencv /模块/ videostab /包括;%(AdditionalIncludeDirectories)

Linker -> general -> additional library directories -> $(OPENCV_DIR)\x86\vc11\staticlib

Linker ->通用->附加库目录-> $(OPENCV_DIR)\x86\vc11\staticlib。

Linker -> Input -> 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; libtiffd.lib; libpngd.lib; libjpegd.lib; libjasperd.lib; IlmImfd.lib; libwebpd.lib; ippicvmt.lib; zlibd.lib; comctl32.lib; vfw32.lib; %(AdditionalDependencies)

Linker ->输入-> 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;libtiffd.lib;libpngd.lib;libjpegd.lib;libjasperd.lib;IlmImfd.lib;libwebpd.lib;ippicvmt.lib;zlibd.lib;comctl32.lib;vfw32.lib;%(AdditionalDependencies)

1 个解决方案

#1


0  

the "C/C++-> General -> Additional include dependencies" config error. You should add the following entry: "C:/opencv/build/include;C:/opencv/build/include/opencv;C:/opencv/build/include/opencv/opencv2;"

“C/ c++ ->通用->附加包含”配置错误。你应该添加以下条目:“C:/opencv/build/include;C:/opencv/build/include/opencv;C:/opencv/build/include/opencv/opencv2;”

#1


0  

the "C/C++-> General -> Additional include dependencies" config error. You should add the following entry: "C:/opencv/build/include;C:/opencv/build/include/opencv;C:/opencv/build/include/opencv/opencv2;"

“C/ c++ ->通用->附加包含”配置错误。你应该添加以下条目:“C:/opencv/build/include;C:/opencv/build/include/opencv;C:/opencv/build/include/opencv/opencv2;”