Back to Geant4 at Fermilab
Back to Novice examples explained
Back to Key Word Page
Back to Index Page for Example N02
Key Word = "Executable File"
Producing an executable
- How do we produce an executable?
Follow the Instructions for Geant4 Users at Fermilab
- Let us pick up the instructions at this point
setenv G4EXAMPLES $G4WORKDIR/examples
setenv G4EXE $G4WORKDIR/bin/Linux-g++
setenv G4LIB $GEANT4_DIR/lib
cd $G4INSTALL/examples
cp -r novice $G4EXAMPLES
- cd $G4WORKDIR/examples/novice/N02/
- This directory contains a GNUmakefile
- The executable is produced by doing a gmake of the GNUmakefile.
- The complexity of what goes on is contained
$(G4INSTALL)/config/binmake.gmk
- A good practice is to always start with gmake clean.
- gmake clean
- gmake
Making dependency for file
exampleN02.cc ...
Making dependency for file
src/ExN02VisManager.cc ...
Making dependency for file
src/ExN02TrackerSD.cc ...
Making dependency for file
src/ExN02TrackerHit.cc ...
Making dependency for file
src/ExN02SteppingVerbose.cc ...
Making dependency for file
src/ExN02SteppingAction.cc ...
Making dependency for file
src/ExN02RunAction.cc ...
Making dependency for file
src/ExN02PrimaryGeneratorAction.cc ...
Making dependency for file
src/ExN02PhysicsList.cc ...
Making dependency for file
src/ExN02MagneticField.cc ...
Making dependency for file
src/ExN02EventAction.cc ...
Making dependency for file
src/ExN02DetectorMessenger.cc ...
Making dependency for file
src/ExN02DetectorConstruction.cc ...
Making dependency for file
src/ExN02ChamberParameterisation.cc ...
Compiling
ExN02ChamberParameterisation.cc ...
Compiling
ExN02DetectorConstruction.cc ...
Compiling
ExN02DetectorMessenger.cc ...
Compiling
ExN02EventAction.cc ...
Compiling
ExN02MagneticField.cc ...
Compiling
ExN02PhysicsList.cc ...
Compiling
ExN02PrimaryGeneratorAction.cc ...
Compiling ExN02RunAction.cc
...
Compiling
ExN02SteppingAction.cc ...
Compiling
ExN02SteppingVerbose.cc ...
Compiling ExN02TrackerHit.cc
...
Compiling ExN02TrackerSD.cc
...
Compiling ExN02VisManager.cc
...
Creating/replacing object
files in
/home/cepa01/andy/G4TEST_7.0/tmp/Linux-g++/exampleN02/libexampleN02.a
...
Compiling exampleN02.cc ...
Using granular libraries ...
Linking exampleN02 ...
- Where is the executable located ?
- bin/Linux-g++/
- What is the executable called?
- exampleN02
- To run the
executaable and watch what is happening:
- ./exampleN02 exampleN02.in >& exN02.out &
- tail-f exN02.out