Using cmake to build geant4 and root example

In the read me file it says:
To compile and use the application with the analysis on, build the example with the following command: cmake -DWITH_ANALYSIS_USE=ON -DGeant4_DIR=/path/to/Geant4_installation /path/to/brachytherapy_example

However when i ‘make’ after running the above cmake it gives an error

It must be to do with -DWITH_ANALYSIS_USE=ON
Because when i make it without this it works fine. Please help

Hi. I am afraid that you will need to the help of the Geant4 colleagues since this is a Geant4 issue. In any case, if you could post the actual error you get, and more details like what version of G4 perhaps we could also help.

Okay, thank you. I decided to try to create my own root files.

/usr/bin/ld: cannot find -lGraf3d
/usr/bin/ld: cannot find -lPostscript
/usr/bin/ld: cannot find -lPhysics
collect2: error: ld returned 1 exit status
CMakeFiles/Brachy.dir/build.make:579: recipe for target ‘Brachy’ failed
make[2]: *** [Brachy] Error 1
CMakeFiles/Makefile2:67: recipe for target ‘CMakeFiles/Brachy.dir/all’ failed
make[1]: *** [CMakeFiles/Brachy.dir/all] Error 2
Makefile:127: recipe for target ‘all’ failed
make: *** [all] Error 2

Can you attach you CMakeList.txt file?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.