Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Cannot open source "XXXXX.hpp" but app still working!

So I installed OpenCV 2.4.9 on a new computer and followed the various steps to link it's dll/lib in Visual Studio 2012 C++, as provided in the doc.

Using the sample code in the doc (copy/paste), the #include "opencv2\highgui\highgui.hpp" and all others opencv related includes are underlined in red, as well as every mention of opencv function/vars in the code. The error provided is "Cannot open source file "XXXXXXX.hpp", which is strange since I followed all the steps (even replacing the version number of the libs).

Stranger is that I compile and no error, run the example program from the command line and it works correctly.

So I started a new solution and tried to build another sample program. Again, same error in the IDE and the program builds just fine.

Anyone ever had a similar problem? In the past, when this kind of error happened, I was simply unable to build the app.

Cannot open source "XXXXX.hpp" but app still building and working!

So I installed OpenCV 2.4.9 on a new computer and followed the various steps to link it's dll/lib in Visual Studio 2012 C++, as provided in the doc.

Using the sample code in the doc (copy/paste), the #include "opencv2\highgui\highgui.hpp" and all others opencv related includes are underlined in red, as well as every mention of opencv function/vars in the code. The error provided is "Cannot open source file "XXXXXXX.hpp", which is strange since I followed all the steps (even replacing the version number of the libs).

Stranger is that I compile and no error, run the example program from the command line and it works correctly.

So I started a new solution and tried to build another sample program. Again, same error in the IDE and the program builds just fine.

Anyone ever had a similar problem? In the past, when this kind of error happened, I was simply unable to build the app.

Cannot Error: 'Cannot open source "XXXXX.hpp" "XXXXX.hpp"' but app still building and working!

So I installed OpenCV 2.4.9 on a new computer and followed the various steps to link it's dll/lib in Visual Studio 2012 C++, as provided in the doc.

Using the sample code in the doc (copy/paste), the #include "opencv2\highgui\highgui.hpp" and all others opencv related includes are underlined in red, as well as every mention of opencv function/vars in the code. The error provided is "Cannot open source file "XXXXXXX.hpp", which is strange since I followed all the steps (even replacing the version number of the libs).

Stranger is that I compile and no error, run the example program from the command line and it works correctly.

So I started a new solution and tried to build another sample program. Again, same error in the IDE and the program builds just fine.

Anyone ever had a similar problem? In the past, when this kind of error happened, I was simply unable to build the app.

Error: 'Cannot open source file "XXXXX.hpp"' but app still building and working!

So I installed OpenCV 2.4.9 on a new computer and followed the various steps to link it's dll/lib in Visual Studio 2012 C++, as provided in the doc.

Using the sample code in the doc (copy/paste), the #include "opencv2\highgui\highgui.hpp" and all others opencv related includes are underlined in red, as well as every mention of opencv function/vars in the code. The error provided is "Cannot open source file "XXXXXXX.hpp", which is strange since I followed all the steps (even replacing the version number of the libs).

Stranger is that I compile and no error, run the example program from the command line and it works correctly.

So I started a new solution and tried to build another sample program. Again, same error in the IDE and the program builds just fine.

Anyone ever had a similar problem? In the past, when this kind of error happened, I was simply unable to build the app.