Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 452
Tomáš Zato - Reinstate Monica Avatar asked Dec 10 '25 03:12

Tomáš Zato - Reinstate Monica


1 Answers

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.

like image 65
欢乐的Xiaox Avatar answered Dec 12 '25 01:12

欢乐的Xiaox



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!