环境,ubuntu 10.04
sudo apt-get install freeglut3-dev //安装OpenGL
#include <GL/glut.h>
int main()
{
gluPerspective (0,0,0,0);
}#g++ test.cpp -o Test -lglut
test.cpp:(.text+0x2ec): undefined reference to `gluPerspective'
collect2: ld returned 1 exit status
undefined reference to “gluLookAt”
以上解决办法:
#g++ test.cpp -o Test -lglut -lGLU
链接OPenGL的库就可以了。。
本文指导如何在Ubuntu10.04环境下解决安装OpenGL后无法使用gluPerspective和gluLookAt函数的问题,通过链接GLUT库即可解决。
1412

被折叠的 条评论
为什么被折叠?



