Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

VS 2015 says it cant find opencv2\opencv.hpp

Hello, I just uncompressed openCV3.1 and put the source and build directory to this directory:

d:\openCV\openCV3.1\

so

d:\openCV\openCV3.1\build\include\opencv2\opencv.hpp

really exists.

Inside my VS 2015 community edition I created a test project whose first line is

#include <opencv2/opencv.hpp>

My project was a console project which was marked as "empty". In the properties page of the project I have set as additional Include directories the following

D:\openCV\OpenCV3.1\build\include;%(AdditionalIncludeDirectories)

but the error persists: the compiler claims that it cannot open the source file opencv2/opencv.hpp It does not help if I replace the slash by a backslash.

I had exactly the same problem with VS 2013 community edition, and posted a question on stackoverflow, but the people who wanted to help were stuck. At the time I found the workaround of copying the whole lot of include files to my source directory. This is not really elegant.

If I right click on the #include "opencv2/opencv.hpp" I get the following message image description Any comments?