Problem 310 - header files cant be found
Summary: header files cant be found
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: visualization/OpenGL (show other problems)
Version: 3.2
Hardware: Sun Solaris
: P2 normal
Assignee: John.Allison
URL:
Depends on:
Blocks:
 
Reported: 2001-10-09 14:16 CEST by slater
Modified: 2001-10-11 05:28 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description slater 2001-10-09 14:16:11 CEST
I tried to build visualization with G4VIS_BUILD_OPENGLX_DRIVER
set to 1. In many routines there are #include directives for
GL/gl.h, GL/glx.h, and GL/glu.h. They all produce error
messages like:

include/G4OpenGLSceneHandler.hh:42: GL/gl.h: No such file or directory
include/G4OpenGLSceneHandler.hh:43: GL/glx.h: No such file or directory
include/G4OpenGLSceneHandler.hh:44: GL/glu.h: No such file or directory


Are these header files part of the GEANT4 distribution and I
failed to set the appropriate environment variable? They
seem not to be anywhere on our sun OS, solaris 8.
Thanks for any help you can give.
Comment 1 John.Allison 2001-10-11 05:28:59 CEST
If you want to use OpenGL, you have to tell Geant4 where your OpenGL
include files and libraries are. On my machine I have to set:
  export OGLHOME=/usr/X11R6
(except I don't have to, since on my machine, running RedHat Linux,
the OpenGL include files and libraries are in the same place
as X11 ones, and asking for OpenGL with G4VIS_BUILD_OPENGLX_DRIVER
is enough to trigger the inclusion in the search path).

So please find out where your OpenGL include files and libraries are.  If
you do not have OpenGL on your system, you can use DAWN or VRML, perhaps, or
install OpenGL or the free version of it, called Mesa, http://www.mesa3d.org.
See http://geant4.kek.jp/~tanaka/GEANT4/g4_vis_gui_linkpage.html,
"How to make environments for Geant4 visualization".

If they are under the same top directory, then OGLHOME is enough.  If they
are in separate branches, you might need OGLFLAGS and OGLLIBS.  See
geant4/config/architecture.gmk, where you will find
# ---------------- OpenGL --------------------
# The user can define his own values of OGLFLAGS and OGLLIBS.
# OGLFLAGS gives the directory containing include files.
#   E.g.: OGLFLAGS  := -I$(OGLHOME)/include
# OGLLIBS gives the libraries.
#   E.g.: OGLLIBS   := -L$(OGLHOME)/lib -lGLU -lGL
#   Or  : OGLLIBS   := -L$(OGLHOME)/lib -lMesaGLU -lMesaGL
# OGLHOME is often /usr or /usr/local.  Or it can point to a special
# installation.
# If the user does not set his/her own values, system-dependent values
# are set below.  Most system-dependent code assumes OGLHOME is set.