Sublime Text and Geant4


I am trying to figure out how I can compile and run Geant4 Applications with Sublime Text 3. For testing I am trying it with the “Example B1”. Maybe someone is using Sublime Text and can help? I am using a Mac.

To include all header files I just passed the locations of them in my build system. It now looks like this:


	"shell_cmd": "g++ \"${file}\" -o \"${file_path}/${file_base_name}\" \"-I/Users/myname/Geant4/geant4-install/include/Geant4\" \"-I${file_path}/include\" ",

	"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
	"working_dir": "${file_path}",
	"selector": "source.c++",

			"name": "Run",
			"shell_cmd": "g++ \"${file}\" -o \"${file_path}/${file_base_name}\" && \"${file_path}/${file_base_name}\""

It is basically the default c++ build system and I added both include folders from the Example B1 and the Geant4 Install Folder with the option “-I/…”.

When I now try to run “” I get error messages like

In file included from /Users/myname/Geant4_new/geant4-install/include/Geant4/CLHEP/Units/PhysicalConstants.h:41:
/Users/myname/Geant4_new/geant4-install/include/Geant4/CLHEP/Units/SystemOfUnits.h:53:20: error: expected unqualified-id
  static constexpr double     pi  = 3.14159265358979323846;


In file included from /Users/myname/Geant4_new/geant4-install/include/Geant4/G4GeomSplitter.hh:41:
/Users/myname/Geant4_new/geant4-install/include/Geant4/G4AutoLock.hh:330:68: error: expected ';' at end of declaration list
    G4TemplateAutoLock(mutex_type& _mutex, std::defer_lock_t _lock) noexcept

And many more of that sort. What could be the problem? I am fairly new to all of this. Thank you!