Ask Your Question
0

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

asked 2014-02-27 09:46:01 -0600

BananaCode gravatar image

updated 2014-02-28 00:36:53 -0600

berak gravatar image

Hello all,

I'm following the tutorial on how to set up OpenCV under Visual Studios 2010: http://docs.opencv.org/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.html#windows-visual-studio-how-to

However, when I try the sample code, I get following error:

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

Does anyone have a way to fix this problem? My current configurations are:

Visual Studios 2010 64-Bit System. OpenCV 2.4.8 OPENCV_DIR Enviromnetal Variable set to C:\OpenCV\Build\x64\vc10\ with the command setx -m OPENCV_DIR C:\OpenCV\Build\x64\vc10

I followed everything exactly like the tutorial said, except for the "Additional Include Directories" part, because the link specified was not valid. I changed it to C:\OpenCV\build\include. Both versions don't work, mine and the one in the tutorial.

The funny thing is, when I put #include <opencv2/**core**/core.hpp> instead of #include <opencv2/core.hpp>, it doesn't complain. I get a linker error instead: fatal error LNK1104: cannot open file 'opencv_core231d.lib'

What is going on? Can anyone help?

Regards

edit retag flag offensive close merge delete

Comments

  • 2,4 has opencv2/core/core.hpp
  • 3.0 has opencv2/core.hpp

since 3.0 is due in a couple of weeks, it's probably 'transition noise' ...

the lib : in 2.4.8 it should be opencv_core248d.lib, not opencv_core231d.lib (pretty obvious, isn't it?)

berak gravatar imageberak ( 2014-02-27 10:26:17 -0600 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2014-02-27 19:42:28 -0600

smilencetion gravatar image

updated 2014-02-27 19:46:00 -0600

you use opencv 2.4.8 why get wrong message about opencv_core231d.lib

edit flag offensive delete link more
0

answered 2014-03-10 12:31:37 -0600

cubei gravatar image

The tutorial says you should go to the properties -> Linker -> Input -> "Additional Dependencies" and add some libraries: opencv_core231d.lib, ... You need to rename them to the version you are using. opencv_core248d.lib, ...

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-02-27 09:46:01 -0600

Seen: 15,952 times

Last updated: Mar 10 '14