12.07.2015 Views

Geant4 User's Guide for Application Developers - Geant4 - CERN

Geant4 User's Guide for Application Developers - Geant4 - CERN

Geant4 User's Guide for Application Developers - Geant4 - CERN

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

AppendixExample 86. An example of a customised GNUmakefile <strong>for</strong> an application or exampleusing external modules bound to <strong>Geant4</strong>.# -----------------------------------------------------------------# GNUmakefile <strong>for</strong> the application "phys" depending on module "reco"# -----------------------------------------------------------------name := physG4TARGET := $(name)G4EXLIB := trueEXTRALIBS += $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)/libphys.a \-L$(HOME)/reco/lib -lrecoEXTRALIBSSOURCEDIRS += $(HOME)/phys $(HOME)/recoEXTRA_LINK_DEPENDENCIES := $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)/libphys.a.PHONY: allall: lib bininclude $(G4INSTALL)/config/binmake.gmkMYSOURCES := $(wildcard $(HOME)/phys/src/*cc)$(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)/libphys.a: $(MYSOURCES)cd $(HOME)/phys; $(MAKE)6. Step-by-Step Installation <strong>Guide</strong>sYou can find below some useful pages collecting instructions on how to install <strong>Geant4</strong> in a detailed step-by-steptutorial:• Step by step Installation <strong>Guide</strong>s.6.1. Building on MS Visual C++<strong>Geant4</strong> can be compiled with the C++ compiler of MS Visual Studio C++ and the Cygwin toolset. Detailedinstructions are given in the Installation manual. As the build system relies on make and other Unix tools usingonly the compiler of MS Visual Studio, the section onSection 5 Makefile and environment variables applies also <strong>for</strong> building with MS Visual C++.We do not support compilation directly under MS Visual Studio, i.e. we do not provide workspace files (.dsw)or project files (.dsp).However the executables created are debuggable using the debugger of MS Visual Studio. You may have to helpthe debugger finding the path to source files the first time you debug a given executable.Listed below are some useful pages with instructions on how to start with the installation of CygWin, and alsotips <strong>for</strong> creating a project under Visual Studio:• Getting started with Cygwin.• Cygwin Installation Notes.• Building a MSVC++ Visual Studio 2005 <strong>Geant4</strong> project (setup no longer supported).7. Development and debug tools7.1. UNIXAlthough not in the scope of this user manual, in this appendix section we provide a set of references to ratherknown and established development tools and environments we think are useful <strong>for</strong> code development in C++ ingeneral. It's a rather limited list, far from being complete of course.• The KDevelop environment on Linux systems.• The GNU Data Display Debugger (DDD).• Valgrind , a system <strong>for</strong> debugging and profiling Linux programs.302

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!