c++qtvisual-studio-2017visual-studio-community

Error Cannot open include file: 'GLES2/gl2.h': No such file or directory suddenly appears


I've compiled my project many times over, both in release and debug configuration. Suddenly, an error appears:

Cannot open include file: 'GLES2/gl2.h': No such file or directory

This is a Qt project in Visual Studio 2017 Community with the Qt add-in, using Qt 5.6.1-64.

I tried to search on google but there seems to be no advice that applies to this issue.


Solution

  • I suffering the same problem. solved by adding this Include :

    $(QTDIR)\include\QtANGLE
    

    I found this solution by notice that project created by Qt Creator can be build without error. And find this include in qmake generated Makefile.