0
我試圖將SFML編譯到android上,並且正在關注this tutorial。我在Ubuntu 64位安裝。我能夠運行cmake命令。但是,當我運行make後,它正在建設的頭部(或東西)我得到這個錯誤:使用Android設置SFML時出錯
In file included from /home/engineer/Desktop/SFML/src/SFML/Graphics/GLCheck.hpp:32:0,
from /home/engineer/Desktop/SFML/src/SFML/Graphics/Texture.cpp:30:
/home/engineer/Desktop/SFML/src/SFML/Graphics/Texture.cpp: In member function 'bool sf::Texture::create(unsigned int, unsigned int)':
/home/engineer/Desktop/SFML/src/SFML/Graphics/GLExtensions.hpp:114:55: error: 'GL_EXT_sRGB' was not declared in this scope
#define GLEXT_texture_sRGB GL_EXT_sRGB
^
/home/engineer/Desktop/SFML/src/SFML/Graphics/Texture.cpp:190:31: note: in expansion of macro 'GLEXT_texture_sRGB'
static bool textureSrgb = GLEXT_texture_sRGB;
^
In file included from /home/engineer/Desktop/SFML/src/SFML/Graphics/Texture.cpp:30:0:
/home/engineer/Desktop/SFML/src/SFML/Graphics/GLExtensions.hpp:115:55: error: 'GL_SRGB8_ALPHA8_EXT' was not declared in this scope
#define GLEXT_GL_SRGB8_ALPHA8 GL_SRGB8_ALPHA8_EXT
^
/home/engineer/Desktop/SFML/src/SFML/Graphics/GLCheck.hpp:51:28: note: in definition of macro 'glCheck'
#define glCheck(expr) (expr)
^
/home/engineer/Desktop/SFML/src/SFML/Graphics/Texture.cpp:213:54: note: in expansion of macro 'GLEXT_GL_SRGB8_ALPHA8'
glCheck(glTexImage2D(GL_TEXTURE_2D, 0, (m_sRgb ? GLEXT_GL_SRGB8_ALPHA8 : GL_RGBA), m_actualSize.x, m_actualSize.y, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL));
^
src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/build.make:353: recipe for target 'src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Texture.cpp.o' failed
make[2]: ** [src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Texture.cpp.o] Error 1
CMakeFiles/Makefile2:343: recipe for target 'src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/all' failed
make[1]: ** [src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2
所以基本上它包含在一個cpp文件宏的問題。在遇到錯誤之前,make會達到64%。