Linux Qt: Boxes demo gluPerspective

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:

#include “GL/glu.h”

Explanation:

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.

Error:

/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.

This entry was posted in Linux, troubleshooting and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s