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

None Re: Error: undefined reference to 'gluErrorString' 

Forum: Installation and Configuration
Re: Question Error: undefined reference to 'gluErrorString' (Laurel Stothers)
Date: 20 Jun, 2014
From: Ben Morgan <Ben Morgan>

On Wed, 18 Jun 2014 16:34:54 GMT, Laurel Stothers wrote:
>
> ...
>
> 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
> 

All I can spot in the above is that there's an apparent mismatch in the path you supply as Geant4_DIR, /home/you/geant4-install/lib64/Geant4-10.0.0, and the path to the library that's actually getting linked, /media/e2f0ca0b-23a6-4896-b1ca-ef81c8fd541c/geant4.10.0-install/lib/libG4OpenGL.so. Could you run make as make VERBOSE=1 and post the output here please? Also, check that your LD_LIBRARY_PATH environment variable doesn't contain /media/e2f0ca0b-23a6-4896-b1ca-ef81c8fd541c/geant4.10.0-install/lib.

 Add Message Add Message
to: "Re: 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 ]