[Linux+OpenGL] **.c:(.text+0x1bc): undefined reference to `gluPerspective'

This isn't a header file issue. Header files are for compiling. This is a linking issue. It needs a library that contains gluPerspective. That library is libGLU.

 

Try:

g++ -Wall -o cube main.cpp imageloader.cpp -lglut -lGLU -lGL

posted @ 2010-12-31 20:34  Chjun  阅读(741)  评论(0编辑  收藏  举报