I was compiling the Linux Qt Demo: Boxes for Qt4.8.1 and ran into these errors. Here’s how I fixed them:
/home/mfang/dev/QtSDK/Demos/4.7/boxes/qtbox.cpp:329: error: ‘gluPerspective’ was not declared in this scope
In qtbox.cpp and scene.cpp add:
According to the Qt SDK reports, they removed the GL/glu.h header file so you need to add the Gl/glue.h header file to qtbox.cpp and scene.cpp.
/home/mfang/dev/QtSDK/Demos/4.7/boxes/scene.cpp:926: undefined reference to `gluPerspective’
Fix in boxes.pro add:
LIBS += -L/usr/local/lib -lGLU
These fixed helped get the Boxes demo project to compile but it didn’t run for me as it seg faulted. Hopefully you’ll have better luck.