linux中 OpenGL 出现 undefined reference to `gluLookAt' 报错
出错状况lh@ubuntu:~$ gcc -lglut -o example example.c/tmp/ccT7NQY2.o: In function `init':example.c:(.text+0x139): undefined reference to `gluLookAt'解决办法输入命令:sudo apt-get installfreeglut3-dev编译运行/
·
原创:http://blog.csdn.net/u013383042/article/details/50345311
- 出错状况
lh@ubuntu:~$ gcc -lglut -o example example.c
/tmp/ccT7NQY2.o: In function `init':
example.c:(.text+0x139): undefined reference to `gluLookAt'
解决办法
输入命令:sudo apt-get install freeglut3-dev编译运行
//注意:这是一定要加上-lGLU库
:~$ gcc -lglut -lGLU -o example example.c
lh@ubuntu:~$ ./example
至此,程序中包含对gluLookAt()函数的调用也可以成功运行了!
更多推荐
已为社区贡献1条内容
所有评论(0)