I’m using VS2010 (downloaded via dreamspark) and although I can open the #include file by right clicking on it and pressing on Open Document, it complains “Error can not open source file “…”” which seems rather absurd. I’m using Qwt with Qt this time around and I’m specifically having the problem for:
#include <qwt_counter.h>
#include <qwt_plot.h>
(And I am using the “<>”); not sure how to make those appear properly in the code above.
Thanks in advance.
As Neil indicated, try using quotes instead of the
<>characters around the filename. When using the quotes, MSVC will look in the same directory as the file the#includeis in for the specified file, then if it’s not found there will look in the directories specified by the include path. When the filename is surrounded by<>characters, the current file’s directory isn’t looked at – the compiler goes right to the include path.See http://msdn.microsoft.com/en-us/library/36k2cdd4.aspx for details.
Note that this is an implementation dependent behavior – it might not apply to other compilers.
If that doesn’t help, make sure that your include path contains the directory that the file is located in by setting the “Include Directories” property appropriately:
Finally, you might be using a makefile project (I’m not sure how common it is for Qt projects to continue to use
qmakewhen built from VS) , in which case you’ll need to perform whatever configuration is necessary in the make file(s) or parameters passed on the command line that invokes the makefiles.