Q: Why do I get errors about GL/gl.h when compiling applications on Linux?
I am getting compilation errors for sample programs after installation of VR Juggler on my Linux box.
[sxaem-1/16:32:13]/usr/local/vrjuggler-1.0.7.linux-rh80/share/samples/tutorials/SimpleApp$ ls main.cpp Makefile simpleApp.cpp simpleApp.h [sxaem-1/16:32:14]/usr/local/vrjuggler-1.0.7.linux-rh80/share/samples/tutorials/SimpleApp$ gmake g++ -DHAVE_CONFIG_H -I/usr/X11R6/include -I/usr/local/vrjuggler/include -I. -Wall -Werror-implicit-function-declaration -g -o main.o -c main.cpp In file included from /usr/local/vrjuggler/include/Kernel/GL/vjGlApp.h:42, from simpleApp.h:9, from main.cpp:6: /usr/local/vrjuggler/include/Kernel/GL/vjGlDrawManager.h:39:19: GL/gl.h: No such file or directory /usr/local/vrjuggler/include/Kernel/GL/vjGlDrawManager.h:40:20: GL/glu.h: No such file or directory In file included from /usr/local/vrjuggler/include/Kernel/GL/vjGlDrawManager.h:45, from /usr/local/vrjuggler/include/Kernel/GL/vjGlApp.h:42, from simpleApp.h:9, from main.cpp:6: /usr/local/vrjuggler/include/Kernel/GL/vjGlWindow.h:40:19: GL/gl.h: No such file or directory In file included from /usr/local/vrjuggler/include/Input/vjInput/vjInput.h:68, from /usr/local/vrjuggler/include/Input/vjPosition/vjPosition.h:44, from /usr/local/vrjuggler/include/Kernel/vjDisplay.h:41, from /usr/local/vrjuggler/include/Kernel/GL/vjGlWindow.h:42, from /usr/local/vrjuggler/include/Kernel/GL/vjGlDrawManager.h:45, from /usr/local/vrjuggler/include/Kernel/GL/vjGlApp.h:42, from simpleApp.h:9, from main.cpp:6: /usr/local/vrjuggler/include/SharedMem/vjMemory.h: In member function `void vjMemory::localDelete(void*)': /usr/local/vrjuggler/include/SharedMem/vjMemory.h:91: warning: deleting `void*' is undefined In file included from /usr/local/vrjuggler/include/Kernel/GL/vjGlApp.h:42, from simpleApp.h:9, from main.cpp:6: /usr/local/vrjuggler/include/Kernel/GL/vjGlDrawManager.h: At global scope: /usr/local/vrjuggler/include/Kernel/GL/vjGlDrawManager.h:175: type specifier omitted for parameter `GLenum' /usr/local/vrjuggler/include/Kernel/GL/vjGlDrawManager.h:175: syntax error before `)' token /usr/local/vrjuggler/include/Kernel/GL/vjGlDrawManager.h:180: syntax error before `*' token /usr/local/vrjuggler/include/Kernel/GL/vjGlDrawManager.h: In constructor `vjGlDrawManager::vjGlDrawManager()': /usr/local/vrjuggler/include/Kernel/GL/vjGlDrawManager.h:229: `mQuadObj' undeclared (first use this function) /usr/local/vrjuggler/include/Kernel/GL/vjGlDrawManager.h:229: (Each undeclared identifier is reported only once for each function it appears in.) In file included from main.cpp:6: simpleApp.h: At global scope: simpleApp.h:17: `GLdouble' was not declared in this scope simpleApp.h:17: syntax error before `,' token simpleApp.h: In member function `void simpleApp::drawCube()': simpleApp.h:117: `GL_QUADS' undeclared (first use this function) gmake: '''*''' [main.o] Error 1
What can be the cause.
A: You do not have the !OpenGL developer environment installed.
On Linux, it is necessary to install the OpenGL headers and libraries in order to compile !OpenGL-based software. Depending on the distribution and the X11 implementation, this may be installed by default. For example, using Fedora Core with X.Org, the RPM xorg-x11-devel must be installed. With older release of Red Hat Linux that use XFree86, the RPM is XFree86-devel.
In some cases, accelerated graphics drivers such as those from NVidia or ATI may include (and install) the necessary !OpenGL developer files.
Back to: LiveFaq
