Message: Problem with GNUmake for Examples Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Problem with GNUmake for Examples 

Keywords: Examples Makefiles Linking Errors
Forum: Documentation and Examples
Date: 13 Feb, 2003
From: Mark G Ibison <Mark G Ibison>

I am a new user of GEANT4 on Linux (Debian v2.2.17) with gcc v2.95.4. The libraries have apparently been correctly installed and $G4INSTALL is set. Running 'gmake' however for any of the Novice Examples produces 'undefined reference' errors - see below. I have looked at the makefiles and checked that the libraries (such as 'libG4run.a') are present and that $G4LIB/$G4SYSTEM points to them.

Can anyone assist please? Thank you.

Using granular libraries ... Linking exampleN01 ... /home/mgi/geant4/tmp/Linux-g++/exampleN01/exe/exampleN01.o: In function `main': /home/mgi/geant4/tmp/Linux-g++/exampleN01/exe/exampleN01.o(.text+0x2a): undefined reference to `G4RunManager::G4RunManager(void)' /home/mgi/geant4/tmp/Linux-g++/exampleN01/exe/exampleN01.o(.text+0x124): undefined reference to `G4UImanager::GetUIpointer(void)' /home/mgi/geant4/tmp/Linux-g++/exampleN01/exe/exampleN01.o(.text+0x136): undefined reference to `G4UImanager::ApplyCommand(char const *)' /home/mgi/geant4/tmp/Linux-g++/exampleN01/exe/exampleN01.o(.text+0x149): undefined reference to `G4UImanager::ApplyCommand(char const *)' /home/mgi/geant4/tmp/Linux-g++/exampleN01/exe/exampleN01.o(.text+0x159): undefined reference to `G4UImanager::ApplyCommand(char const *)' /home/mgi/geant4/tmp/Linux-g++/exampleN01/exe/exampleN01.o: In function `G4NavigationLevelRep::operator delete(void *)': /home/mgi/geant4/tmp/Linux-g++/exampleN01/exe/exampleN01.o(.gnu.linkonce.t.__dl__20G4NavigationLevelRepPv+0x16): undefined reference to `aNavigLevelRepAllocator' /home/mgi/geant4/tmp/Linux-g++/exampleN01/libexampleN01.so: undefined reference to `G4VUserPrimaryGeneratorAction::~G4VUserPrimaryGeneratorAction(void)' /home/mgi/geant4/tmp/Linux-g++/exampleN01/libexampleN01.so: undefined reference to `G4cout' /home/mgi/geant4/tmp/Linux-g++/exampleN01/libexampleN01.so: undefined reference to `G4VUserPhysicsList::CheckForRetrievePhysicsTable(G4String const &, bool)' /home/mgi/geant4/tmp/Linux-g++/exampleN01/libexampleN01.so: undefined reference to `G4PVPlacement::G4PVPlacement(HepRotation *, Hep3Vector const &, G4String const &, G4LogicalVolume *, G4VPhysicalVolume *, bool, int)' /home/mgi/geant4/tmp/Linux-g++/exampleN01/libexampleN01.so: undefined reference to `G4VUserDetectorConstruction::~G4VUserDetectorConstruction(void)' /home/mgi/geant4/tmp/Linux-g++/exampleN01/libexampleN01.so: undefined reference to `G4VUserPhysicsList type_info function' /home/mgi/geant4/tmp/Linux-g++/exampleN01/libexampleN01.so: undefined reference to `G4VUserPrimaryGeneratorAction type_info function' /home/mgi/geant4/tmp/Linux-g++/exampleN01/libexampleN01.so: undefined reference to `G4Geantino::GeantinoDefinition(void)' /home/mgi/geant4/tmp/Linux-g++/exampleN01/libexampleN01.so: undefined reference to `G4VUserPhysicsList type_info node' /home/mgi/geant4/tmp/Linux-g++/exampleN01/libexampleN01.so: undefined reference to `G4Tubs::G4Tubs(G4String const &, double, double, double, double, double)' /home/mgi/geant4/tmp/Linux-g++/exampleN01/libexampleN01.so: undefined reference to `G4PVPlacement::G4PVPlacement(HepRotation *, Hep3Vector const &, G4LogicalVolume *, G4String const &, G4LogicalVolume *, bool, int)' /home/mgi/geant4/tmp/Linux-g++/exampleN01/libexampleN01.so: undefined reference to `G4VUserPhysicsList::~G4VUserPhysicsList(void)' /home/mgi/geant4/tmp/Linux-g++/exampleN01/libexampleN01.so: undefined reference to `G4Box::G4Box(G4String const &, double, double, double)' /home/mgi/geant4/tmp/Linux-g++/exampleN01/libexampleN01.so: undefined reference to `G4VUserPhysicsList::SetCutsWithDefault(void)' /home/mgi/geant4/tmp/Linux-g++/exampleN01/libexampleN01.so: undefined reference to `G4VUserPhysicsList::CheckMaterialInfo(G4String const &, bool)' /home/mgi/geant4/tmp/Linux-g++/exampleN01/libexampleN01.so: undefined reference to `G4VUserPhysicsList::G4VUserPhysicsList(void)' /home/mgi/geant4/tmp/Linux-g++/exampleN01/libexampleN01.so: undefined reference to `G4VUserPrimaryGeneratorAction::G4VUserPrimaryGeneratorAction(void)' /home/mgi/geant4/tmp/Linux-g++/exampleN01/libexampleN01.so: undefined reference to `G4VUserPhysicsList::RetrieveCutValues(G4String const &, bool)' /home/mgi/geant4/tmp/Linux-g++/exampleN01/libexampleN01.so: undefined reference to `G4VUserPrimaryGeneratorAction type_info node' /home/mgi/geant4/tmp/Linux-g++/exampleN01/libexampleN01.so: undefined reference to `G4VUserDetectorConstruction type_info function' /home/mgi/geant4/tmp/Linux-g++/exampleN01/libexampleN01.so: undefined reference to `G4ParticleGun::SetParticleDefinition(G4ParticleDefinition *)' /home/mgi/geant4/tmp/Linux-g++/exampleN01/libexampleN01.so: undefined reference to `G4VUserDetectorConstruction::G4VUserDetectorConstruction(void)' /home/mgi/geant4/tmp/Linux-g++/exampleN01/libexampleN01.so: undefined reference to `G4VUserPhysicsList::StoreCutValues(G4String const &, bool)'

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

1 Feedback: Re: Problem with GNUmake for Examples   (Gabriele Cosmo - 14 Feb, 2003)
(_ None: Shared & Static Libraries problem?   (Mark Ibison - 14 Feb, 2003)
(_ None: Re: Shared & Static Libraries problem?   (Stephan Linn - 28 Mar, 2003)
 Add Message Add Message
to: "Problem with GNUmake for Examples"

 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 ]