I try to compile QT 5.0.0 in the command prompt of Visual Studio 2010 on Windows 7, 64bit. The process itself is known and described here and here. On my machine, compilation stops because the compiler does not find a file:
fatal error C1083: [..] "GLES2/gl2.h": No such file or directory
I found that missing file in a subdirectory of C:\QTSources
- the folder in which I try to build the sources.
I added the line INCLUDEPATH += "C:/QTSources/qtwebkit/Source/ThirdParty/ANGLE/include"
to the file qtsdk.pro which seems to be used by qmake for the generation of the Makefile when I say configure [options]
. This is suggested to do so here but it does not help. The path does show up neither in the Makefile nor in any call to the compiler.
How can I properly declare my include?
I got the same problem attempting to build qt5.0 and qt5.1 with vs2012. The problem was simply solved by adding the parameter "-opengl desktop" (no quotes) to the config command and rebuilding (make/nmake/jom/mingw32-make). I think that all the other stuff mentioned in not necessary to fix you original stated problem.
When migrating form VS2008 to VS2010 (Win7) I had the same error message regarding "GLES2/gl2.h.
The solution was to add
\include\QtANGLE
to the "AdditionIncludeDirectory" parameter in the project properties.
QtANGLE is an alternative to the opengl graphics library as far as I know.
So it seems, that you don't have to build Qt from scratch on windows but you can use the precompiled version. At least not because of the present topic.
I had the same problem and I finally found the solution (the only difference is that I'm using VS 2008, but I'm using Windows 7, and I needed the 64 bit target as you).
The main problem is that the compressed file that you download from the Qt site is not ok. You have to use what is in the Git repository (currently version 5.0.1, but not the same as the 5.0.1 version that you get from the downloads page)
Here is what I did, step by step, exactly:
prerequisites: have git, perl, python and ruby installed, you have to check your path to see if you can access the executables from anywhere. Search for download links here: http://qt-project.org/wiki/Building-Qt-5-from-Git under "Windows Build environment" section. For Git, download it from here http://git-scm.com
then do the following:
go to the directory where you want to install Qt.
open a Visual Studio x64 Win64 Command Prompt, look for it or for VS 2008 you can execute: %comspec% /k ""c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"" amd64
inside that window:
then press "y" for accepting the licence terms
...and that's all.
Note to the original question: You asked "How can I properly declare my include?" and after you explained the way you finally solved it: "...I copied the whole folder in which the file resides into a path known to the compiler...".
Instead of doing that, you might prefer to leave the folder in its original location and do the following before calling nmake:
Note that I used SET CL=/MP before, that's for building faster by using the multiple cores of the processor. So, for that case, you should do:
Have you tried looking at this link?
http://qt-project.org/wiki/Building-Qt-5-from-Git