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 Any comments?
for a while I thought I had inverted opencv2 and opencv, but no. Hardwiring the include path is another workaround at first sight, but then using namespace cv causes an error!
well, you say, that you appended opencv/build/include to your additional includes, but the messagebox above proves you wrong.
That's all very well, but I could post up a screen shot showing my entry for "Additional Include Directories"