Solved Missing header file EGL/egl.h while building Qt 5.9.1 on Windows
-
While building the qt-everywhere-opensource-src-5.9.1 source package on Windows 10, I fail with the error: "fatal error C1083: Cannot open include file: 'EGL/egl.h': No such file or directory" while compiling the file qtbase/src/plugins/platforms/windows/qwindowsintegration.cpp.
I am compiling with the vc140 toolset and my configuration flags are as follows:
-opensource -confirm-license -debug-and-release -shared -platform win32-msvc2015 -sse2 -no-plugin-manifests -no-ltcg -skip qtscript -skip qtserialport -skip qtsensors -skip qtandroidextras -skip qtwebengine -make libs -make tools -nomake tests -nomake examples -no-compile-examples -no-dbus -no-incredibuild-xge -mp -no-icu -qt-pcre -qt-zlib -no-openssl -qt-freetype -no-harfbuzz -opengl dynamic -qt-libpng -qt-libjpeg -sql-odbc -no-sqlite
Possibly worth mentioning in case it matters: I am not running configure in the source directory, but rather running it from its source directory location while in a separate staging directory. This has worked for me when compiling 5.6.1 from source and allows me to clean up intermediate build products or partial builds easily by deleting the staging directory.
Am I missing a dependency or configuration step?
-
Addenda:
- If I add the -angle flag to my configuration flags, the build fails at the configuration stage with the following message:
ERROR: Feature 'angle' was enabled, but the pre-condition 'config.win32 && tests.directx' failed.
I have the Windows 10 SDK installed, and to my best understanding this now includes the DirectX SDK, but the configuration DirectX SDK check fails. - If I change the opengl flag to -opengl desktop, the build fails:
'fxc.exe' is not recognized as an internal or external command, operable program or batch file.
I have found fxc.exe in the %PROGRAMFILES(X86)%/Windows Kits/10 directory but am not sure how to supply the Windows 10.0.15063.0 kit to the Qt build process.
https://bugreports.qt.io/browse/QTBUG-52487 seems to have some relevant information but any additional help would be greatly appreciated.
- If I add the -angle flag to my configuration flags, the build fails at the configuration stage with the following message:
-
I was able to compile successfully after the following steps:
- Installed the DirectX SDK available here: https://www.microsoft.com/en-us/download/details.aspx?id=6812
- Added the location of fxc.exe to the PATH environment variable
- Set the configuration flags -opengl dynamic and -angle
-
I followed your instructions yet:
'QOpenGLFunctions_ES2': is not a class or namespace name -
@pip010 How did you install Qt? QOpenGLFunctions_ES2 is part of Qt since 5.1
Do you have this in your pro file:QT += gui
?
-
I dont have a pro file. I am building Qt in windows. Using cmd. This option fails for me too (with angle).