Skip to main content

Building Geant4 Applications on Windows with CMake and Visual Studio

As of version 9.5, Geant4 uses CMake and Visual Studio to build and install on Windows platforms.

CMake and Visual Studio can also be used to build Geant4 applications on Windows, and the slideshow below shows the basic sequence of steps needed to run CMake and Visual Studio to build exampleB1 from the Geant4 examples.

It assumes that you have already installed Geant4 and configured your environment using the Geant4 Install Guide for Windows.

Windows 7, CMake 2.8.4 and Visual Studio 2010 Express were used in preparing this example so you may need to adjust the specifics of each step if you use Windows XP and/or a different edition of CMake and Visual Studio.

Any questions on, or problems with, this walkthrough should be posted to Geant4's Documentation and Examples Forum.