Message: Error: undefined reference to 'gluErrorString' Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Error: undefined reference to 'gluErrorString' 

Forum: Installation and Configuration
Date: 18 Jun, 2014
From: Laurel Stothers <Laurel Stothers>

Good morning,

I am currently installing Geant4 using the provided Cern installation guide and have come across an error while building example B1-- I would sincerely appreciate anyone's thoughts on this situation.

OS: Ubuntu 12.04
Build options:
GEANT4_BUILD_MULTITHREADED=ON
GEANT4_INSTALL_DATA=ON
GEANT4_USE_QT=ON
GEANT4_USE_OPENGL_X11=ON
GEANT4_USE_SYSTEM_EXPAT=OFF
BUILD_SHARED_LIBS=OFF
BUILD_STATIC_LIBS=ON

To install Geant4, I configured the build directory and ran CMake with the above build conditions. This step finished without errors. I then ran the build by executing make -j4 (for the quad core machine) followed by make install, which both finished without error.

Next, I moved on to building example B1. Following the installation guide, I used:
$ cd $HOME/B1-build
$ cmake -DGeant4_DIR=/home/you/geant4-install/lib64/Geant4-10.0.0 $HOME/B1

which did indeed generate the anticipated Makefiles. I see the same ouput as outlined in the manual, with zero errors.

Problems arise when I build the example by running:
$ make -j4

This command produces the following output:

$ make -j4
Scanning dependencies of target exampleB1
[ 25%] [ 25%] [ 37%] [ 50%] Building CXX object CMakeFiles/exampleB1.dir/exampleB1.cc.o
Building CXX object CMakeFiles/exampleB1.dir/src/B1SteppingAction.cc.o
Building CXX object CMakeFiles/exampleB1.dir/src/B1PrimaryGeneratorAction.cc.o
Building CXX object CMakeFiles/exampleB1.dir/src/B1DetectorConstruction.cc.o
[ 62%] Building CXX object CMakeFiles/exampleB1.dir/src/B1Run.cc.o
[ 75%] Building CXX object CMakeFiles/exampleB1.dir/src/B1RunAction.cc.o
[ 87%] Building CXX object CMakeFiles/exampleB1.dir/src/B1EventAction.cc.o
[100%] Building CXX object CMakeFiles/exampleB1.dir/src/B1ActionInitialization.cc.o
Linking CXX executable exampleB1
/media/e2f0ca0b-23a6-4896-b1ca-ef81c8fd541c/geant4.10.0-install/lib/libG4OpenGL.so: error: undefined reference to 'gluPickMatrix'
/media/e2f0ca0b-23a6-4896-b1ca-ef81c8fd541c/geant4.10.0-install/lib/libG4OpenGL.so: error: undefined reference to 'gluLookAt'
/media/e2f0ca0b-23a6-4896-b1ca-ef81c8fd541c/geant4.10.0-install/lib/libG4OpenGL.so: error: undefined reference to 'gluErrorString'
collect2: ld returned 1 exit status
make[2]: *** [exampleB1] Error 1
make[1]: *** [CMakeFiles/exampleB1.dir/all] Error 2
make: *** [all] Error 2


How should I proceed? I have tried setting manual links to the glu headers, running -jN with different N's, changing libraries to static etc. I can't seem to find the solution.
Thanks!

Laurel

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Error: undefined reference to 'gluErrorString'   (Ben Morgan - 20 Jun, 2014)
 Add Message Add Message
to: "Error: undefined reference to 'gluErrorString'"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]