Reputation: 316
I am trying to run the simple test code below on Visual Studio 2015 with OpenCv 3.1 on windows 10.
#include <opencv2\opencv.hpp>
using namespace cv;
int main()
{
namedWindow("win");
waitKey(0);
return 1;
}
But i get
Error C1083 Cannot open include file: 'opencv2\opencv.hpp': No such file or directory
I have added the Path C: \ opencv \ build \ x64 \ vc14 \ bin
to System variable in the Windows Environment variables.
Also in Visual studio I have set the Include Directories C:\opencv\build\include;$(IncludePath)
under Project properties > VC++ Directories
and also the Linker > Input Additional Dependencies
set to opencv_world310d.lib
(Debug)
I also have the following setting:
Executable Directories - C:\opencv\build\x64\vc14
Library Directories - C:\opencv\build\x64\vc14\lib
Additional Library Directories - C:\opencv\build\x64\vc14\lib
Please help me resolve this error.
Upvotes: 2
Views: 9351
Reputation: 316
I found the solution finally, on the Project > Properties I had to change platform to x64 and the set the bin, lib and include folders again
Upvotes: 3