简体   繁体   中英

cmake error when i have tried to build a compilining?

i have tried to compline a repository via "https://github.com/giglio0/DRAGON-G4-LaBr3.git" but while the compiling, i have taken a error. I don't Know why it is? i am not a coder. Just i want to build this repository and run the simulation with changing some parameters. The error output is;

Scanning dependencies of target LaBr3_v4
[  9%] Building CXX object CMakeFiles/LaBr3_v4.dir/LaBr3_v4.cc.o
[ 18%] Building CXX object CMakeFiles/LaBr3_v4.dir/src/DetectorConstruction.cc.o
[ 27%] Building CXX object CMakeFiles/LaBr3_v4.dir/src/DetectorMessenger.cc.o
[ 36%] Building CXX object CMakeFiles/LaBr3_v4.dir/src/EventAction.cc.o
[ 45%] Building CXX object CMakeFiles/LaBr3_v4.dir/src/HistoManager.cc.o
/home/cancan/Gatev9/example_Geant4/LaBr/LaBr3/src/HistoManager.cc:29:10: fatal error: TH1D.h: No such file or directory
   29 | #include <TH1D.h>
      |          ^~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/LaBr3_v4.dir/build.make:134: CMakeFiles/LaBr3_v4.dir/src/HistoManager.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/LaBr3_v4.dir/all] Error 2
make: *** [Makefile:149: all] Error 2

can anybody help me?

Apparently you need to install the ROOT library, see: https://root.cern.ch/doc/master/classTH1.html

BTW, the READ.me of the application you want to compile, DRAGON-G4-LaBr3, is awful.

After your advice, i install root-6.22.06 again with use this command;

cmake -DCMAKE_INSTALL_PREFIX=/home/cancan/Gatev9/root-6.22.06-install /home/cancan/Gatev9/root-6.22.06 -Dall=ON

i learned from somewhere if i use "-Dall=ON", i can install all libraries of root but it has not still worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM