![致命错误:GLES2/gl2.h:没有此文件或目录](https://linux22.com/image/1088386/%E8%87%B4%E5%91%BD%E9%94%99%E8%AF%AF%EF%BC%9AGLES2%2Fgl2.h%EF%BC%9A%E6%B2%A1%E6%9C%89%E6%AD%A4%E6%96%87%E4%BB%B6%E6%88%96%E7%9B%AE%E5%BD%95.png)
我正在尝试在 RPi 3 上安装 Urho3D。(GPU = 768 MB)
我安装了所有必需的依赖项。所有步骤都顺利进行。直到在最后的 make 步骤中出现此错误:
[ 56%] Building CXX object Source/Urho3D/CMakeFiles/Urho3D.dir/Graphics/Skybox.cpp.o
[ 57%] Building CXX object Source/Urho3D/CMakeFiles/Urho3D.dir/Graphics/Graphics.cpp.o
In file included from /root/Urho3D/Source/Urho3D/Graphics/../Graphics/GraphicsImpl.h:29:0,
from /root/Urho3D/Source/Urho3D/Graphics/Graphics.cpp:34:
/root/Urho3D/Source/Urho3D/Graphics/../Graphics/OpenGL/OGLGraphicsImpl.h:36:23: fatal error: GLES2/gl2.h: No such file or directory
#include <GLES2/gl2.h>
^
compilation terminated.
Source/Urho3D/CMakeFiles/Urho3D.dir/build.make:1916: recipe for target 'Source/Urho3D/CMakeFiles/Urho3D.dir/Graphics/Graphics.cpp.o' failed
make[2]: *** [Source/Urho3D/CMakeFiles/Urho3D.dir/Graphics/Graphics.cpp.o] Error 1
CMakeFiles/Makefile2:1198: recipe for target 'Source/Urho3D/CMakeFiles/Urho3D.dir/all' failed
make[1]: *** [Source/Urho3D/CMakeFiles/Urho3D.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2
有什么建议吗?我该怎么办!?
答案1
我在编译其他项目时也遇到了类似的错误。按照@steeldriver 的建议,我通过安装库解决了这个问题:
sudo apt-get install libgles2-mesa-dev