Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Building Geant4 Using the Native Compilation Script

...

  1. Install cygwin, if you do not already have it.
    Include gcc-g77 in the installation
    You may need to install an older version of "make"
    Rename the link.exe to link_cyg.exe, so it will not be used.  See:  http://geant4.web.cern.ch/geant4/support/windows_note.shtmlImage Removed
  2. Obtain and build CLHEP 1.9.2.3 (the source for 1.9.2.2 no longer seems to be available)
  3. Obtain the source from /afs/slac/g/glast/ground/GLAST_EXT/srcExtlibs/geant4-8.0.p01-gl4-src.tar.gz and unpack a geant4.8.0.p01 directory will be created.
  4. In a DOS command window, set up to use VS 2008:
    1. set PATH=
    2. set LIB=
    3. set INCLUDE=
    4. Run C:\Program Files\Microsoft Visual Studio 9.0\Common\Tools\vsvars32.bat
    5. set LIB=C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib;%LIB%
    6. set PATH=C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin;%PATH%
    7. set INCLUDE=C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include;include;%INCLUDE%
  5. Start up a cygwin session:
    cd cygwin/bin
    bash --login -i
  6. Enter the directory containing your G4 source code
  7. Set the G4_NO_VERBOSE flag
    export G4_NO_VERBOSE=1
  8. set CLHEP_LIB to CLHEP.lib (avoid trouble building shared libraries)
    export CLHEP_LIB=CLHEP.lib
  9. Create a data directory in the top-level of the G4 source
  10. Run G4's Configure script
    ./Configure -build
    1. OS: WIN-VC
    2. Expect to run these binaries on multiple machines:  y
    3. You'll answer where the source is located
    4. Take default for where to install the libraries
    5. Copy all headers into one directory
    6. Store data in data directory
    7. Accept default directories

...