PDA

View Full Version : OpenGL in arm-linux-gnueabihf compilation, Qt 4.8.x, ( GLUquadricObj is not a type )



Aravinda
27th February 2013, 13:36
Greetings to all!
There seems to be a problem with porting Qt to (some) arm platforms and use OpenGL

I do not know how to include some of OpenGL libs with Ubuntu 13.04 raring-preinstalled-desktop-armhf (for Nexus 7)
which I used normally with i386 and amd64 platforms and earlier distributions (of Qt and Linux Ubuntu ).
Using a class GLUquadricObj produces an error:

'GLUquadricObj’ does not name a type

when I try to include directly a file which defines that class (like #include "/usr/include/GL/glu.h" ) , I get multiple 'redefinition' errors (in GL headers)
Is there a 'decent', known by anybody, way to use OpenGL libs on this platform?
Thanks to any constructive hints!

wysota
28th February 2013, 01:11
GLU is not part of standard OpenGL interface. You need to link against an external library for it.

Aravinda
28th February 2013, 16:01
There are instructions in Makefile which care about compiling against GLU libs, they are the same (as were; also, they are not mentioning location of GLU include file(s) directly - those are/were included in qgl.h), but instead of (former) -lGL there now -lGLESv2

And adding into Makefile locations directly gives mentioned (above) 'multiple redefinitions' like (here is the first one only):

In file included from //usr/include/GL/glu.h:38:0,
from mainwindow.h:13,
from main.cpp:1:
/usr/include/GL/gl.h:162:17: error: conflicting declaration ‘typedef double GLdouble’


I think that should be a problem with migrating from GL to GLES(v2) (installing libgles2-mesa-dev does not help)

MaxteN
23rd September 2014, 20:44
Hey Aravinda,

Any luck with this issue? I am also having the same problems.

For me I am having problems including "glu.h" on my "Qt 5.3.0 openGL ES2" build. Unfortunately there is no support for "openGL ES1" since I have seem a port for "glu.h" for ES1, but not for ES2.

Regards,
Mark