linux下 Qt 中 OpenGL error: not declared in this scope

来源:互联网 发布:傲剑飞龙升级数据 编辑:程序博客网 时间:2024/06/06 02:27

多半是没有装 GLEW,装好GLEW之后,将 #include<GL/glew.h> 添加到所有include之前(不这样的话会报错说 “ gl.h 在 glew.h 之前”),并在 LIBS中添加 -lGLEW 包,有可能需要调用glewInit()函数。可能出现的问题参看StackOverflow:

http://stackoverflow.com/questions/4225554/how-to-use-glew-with-qt

http://stackoverflow.com/questions/8989942/glew-linking-problems-in-qt-creator




原创粉丝点击