February 8, 2012

nicegom nicegom
Lab Rat
3 posts

#include <GL/glu.h> was removed from QtOpenGL/qgl.h while upgrading from Qt 4.7.3 to 4.8

 

Hi,

I found that there is a problematic change in the file ‘QtOpenGL/qgl.h’ when upgrading from 4.7.3 to 4.8.0.
this line was removed:

  1. # include <GL/glu.h>

This change introduces lots of errors when I tried to compile any previous codes and libraries related with OpenGL.

As a banding solution, I manually added it back to 4.8.0 (or return to 4.7.X) and the compilation succeeds and really don’t want to modify any headers of GPL or LGPL libraries while I’m compiling them. Shall we return the include statement for the backward compatibility?

Cheers,

5 replies

February 8, 2012

stuk stuk
Ant Farmer
540 posts

I include

  1. #include <QtOpenGL>

And all works well after install the correct package with aptitude (in on ubuntu)

February 8, 2012

Tobias Hunger Tobias Hunger
Mad Scientist
3224 posts

Please consider to file a bug report [bugreports.qt.nokia.com] .

Bug reports automatically end up at the desk of somebody who can actually fix something, forum posts do not.

February 8, 2012

nicegom nicegom
Lab Rat
3 posts

OK, I think I solve the problem by adding the following lines under Line 90 (after the include statement for gl.h):

  1. #if defined(Q_WS_MAC)
  2. # include <OpenGL/glu.h>
  3. #else
  4. # ifndef QT_LINUXBASE
  5. #   include <GL/glu.h>
  6. # endif
  7. #endif

in thee files in the SDK 1.2

/Developer/QtSDKs/QtSDK1.2/Desktop/Qt/4.8.0/gcc/lib/QtOpenGL.framework/Versions/4/Headers/qgl.h
/Developer/QtSDKs/QtSDK1.2/Desktop/Qt/4.8.0/gcc/include/Qt/qgl.h
/Developer/QtSDKs/QtSDK1.2/Desktop/Qt/4.8.0/gcc/include/QtOpenGL/qgl.h

Now I can compile any previous libraries and codes smoothly without hacking any codes.

Thanks!

February 8, 2012

nicegom nicegom
Lab Rat
3 posts

Although I solved the compilation errors, I actually introduced a new problem now. When I launch the compiled application, it launches X-Windows, instead of using OS X OpenGL implementation. When I used Qt 4.7.X, I didn’t have this problem. Could you explain why X-windows is launched? Didn’t I mess up something?

Cheers,

February 9, 2012

miroslav miroslav
Lab Rat
228 posts

You are probably linking to the X11 version of the underlying GL library. Try running tool -L on the program binary. If X11 is installed on Mac Os X, you end up with GL implementations for X11 and native OSX.

 Signature 

Mirko Boehm | .(JavaScript must be enabled to view this email address) | KDE e.V.
FSFE Fellow
Qt Certified Specialist

 
  ‹‹ launching app outside of Creator?      Setting up cross-compiling Qt environment for Tegra 2 board ››

You must log in to post a reply. Not a member yet? Register here!