Xcode & Geant4

Xcode for developing Geant4

Let try to compile examples/novice/N04 with Xcode
(maybe there is something more easy)

  1. Open Xcode (:))
  2. Select New Project from file menu and select External Build System
  3. Select your project Name: XcodeN04 for example and give
  4. the path where the example is installed (for me /Applications/geant4.8.3/examples/novice/N04/)

  5. Open the disclosure triangle beside the XcodeN04 (left side)
    drag the folder containing the sources files src (Tell Xcode not to copy files)
  6. From the Project Menu choose New Target and select Shell Script Target
    and give a name Xenv.sh (for example) and close the pop up window
  7. Open the disclosure triangle beside Xenv.sh and double click on Run Script
  8. Add those following line between #shell script… and exit 0 :
  9. # shell script goes here
    source $G4INSTALL/env.sh
    exit 0

    (give the full path of $G4INSTALL)

  10. From the Project Menu Set Active Target select the name of your script
    file here Xenv.sh
  11. you can build now, it should work …

Ce contenu a été publié dans Informatique, Mac Os X, avec comme mot(s)-clé(s) . Vous pouvez le mettre en favoris avec ce permalien.

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *