Home Geant4 Install
Geant4 Install PDF Print E-mail
Written by Willy Gerber   
Friday, 19 June 2009 12:22

Instructions for the Geant4 installation on Windows platform

Recommended Guide: Stanford SLAC Geant4 Installation Guide

Microsoft Visual C++ and Microsoft Platform SDK
Cygwinhttp://www.cygwin.com/
CLHEPhttp://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/clhep.htmlCLHEP

Cygwin

Work in Cygwin

c:/CLHEP

Create directory

cd c:/CLHEP

Change directory

tar –zxvf clhep-?.?.?.?.tgz

Unpacking clhep (Version ?.?.?.?)

cd ?.?.?.?/CLHEP

Change to unpacked directory

./configure --prefix /cygdrive/c/CLHEP/

Configure

make

Run the build process

make install

Build products
Xerceschttp://xerces.apache.org/xerces-c/

Cygwin

Work in Cygwin

cd $G4INSTALL

Move to install directory

mkdir xercesc

Make directory xercesc

cd xercesc

Move to xercesc directory

tar -zxvf xerces-c-src_2_8_0.tar.gz

Download xerces-c-src_2_8_0.tar.gz to xercesc and extract

export XERCESCROOT=$G4INSTALL/xercesc/xerces-c-src_2_8_0

Setup XERCESCROOT

cd xercesc/xerces-c-src_2_8_0/src/xercesc

Move to xerces-c-src_2_8_0/src/xercesc directory

./runConfigure -pcygwin -cgcc -xg++ -minmem -nsocket -tnative -rpthread -P `cd ../../..; pwd`

Configurate

make

Run the build process

make install

Build products

export XERCESCROOT=$G4INSTALL/xercesc/xerces-c-src_2_8_0

Setup XERCESCROOT

export LD_LIBRARY_PATH=$XERCESCROOT/lib

Setup LD_LIBRARY_PATH
GDMLhttp://gdml.web.cern.ch/GDML/

Cygwin

Work in Cygwin

cd $INSTALL

Move to install directory

mkdir gdml

Make directory gdml

cd gdml

Move to gdml directory

tar -zxvf –zxvf GDML_2_8_0.tar.gz

Download –zxvf GDML_2_8_0.tar.gz to gdml and extract

cd CPPGDML

Move to CPPGDML directory

./configure --with-geant4=/path/to/geant4 --with-xercesc=/path/to/xercesc --with-clhep=/path/to/clhep --prefix=/path/to/install/dir --enable-shared=no


Configure, for example ./configure --with-geant4=c:/Geant4/geant4_9_2/source/run --with-xercesc=c:/Geant4/geant4_9_2/xercesc --with-clhep=c:/CLHEP --prefix=c:/Geant4/geant4_9_2/gdml --enable-shared=no

make

Run the build process

make install

Build products
Geant4http://geant4.web.cern.ch/geant4

Cygwin

Work in Cygwin

c:/Geant4

Create Geant4 directory

Download Geant4

Download http://geant4.web.cern.ch/geant4/support/source/geant4_9.zip to c:/Geant4

c:\Geant4\geant4_?_?

Unzip creating a directory geant4_?_? (? Version)

Cygwin

Work in Cygwin

cd c:/Geant4

Change directory to c:/Geant4

tar –zxvf geant4.?.?.tar.gz

Unpacking geant4.?.?

c:\Geant4\geant4_?_?\data

Create data directory

Download G4EMLOW

Download http://geant4.web.cern.ch/geant4/support/source/G4EMLOW.?.?.tar.gz to c:/Geant4/geant4_?_?/data

cd c:/Geant4/geant4_?_?/data

Change directory to c:/Geant4/geant4_?_?/data

tar –zxvf G4EMLOW.?.?.tar.gz

Unpacking G4EMLOW.?.?

cd c:/Geant4/geant4_?_?

Change directory for the building process

./Configure -build

Building

Building dialog


Actions

WIN32-VCOS: WIN32, Compiler: VC
c:/Geant4/geant4_?_?Where is Geant4 source installed
c:/Geant4/geant4_?_?Specify the path where Geant4 libraries and sources are istalled
c:/Geant4/geant4_?_?/dataSpecify the path where Geant4 data libraries are istalled
c:/CLHEPSpecify the path where CLHEP is installed
CLHEP_INCLUDE_DIR
CLHEP_LIB_DIR
CLHEP_LIB
Specify the path where CLHEP libreries are installed

ndll libreries
nglobal compound libreries
ncompile libreries in DEBUG mode
nG4UI_NONE
yG4UI_BUILD_WIN32_SESSION
G4UI_USE_WIN32
nG4UI_BUILD_QT_SESSION
G4UI_USE_QT
nG4VIS_NONE
yG4VIS_BUILD_OPENGLWIN32_DRIVER
G4VIS_USE_OPENGLWIN32
nG4VIS_BUILD_OIWIN32_DRIVER
G4VIS_USE_OIWIN32
nG4VIS_BUILD_OPENGLQT_DRIVER
G4VIS_USE_OPENGLQT
yG4LIB_BUILD_GDML .. will check for XercesC
nG4LIB_BUILD_G3TOG4
yG4LIB_BUILD_ZLIB
nG4ANALYSIS_USE

./Configure

Creating the setup script
Example structure 
c:/cygwinCygwin
c:/CLHEPCLHEP
c:/Geant4/geant4_9_2Geant4
c:/Geant4/geant4_9_2/libGeant4 lib
c:/Geant4/geant4_9_2/dataGeant4 data
c:/Geant4/geant4_9_2/xercescXerces
c:/Geant4/geant4_9_2/gdmlGdml
c:/G4WorkWork directory
Last Updated ( Sunday, 21 June 2009 01:47 )
 
Copyright © 2010 gPhysics. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.