Message: linking geant4 with root Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None linking geant4 with root 

Forum: Installation and Configuration
Date: 10 Nov, 2015
From: Pete Wu <Pete Wu>

Dear Geant4 Experts,

 Iím trying to compile my code, which is based on basic example B3 of GEANT4. When I try to build my program using the cmake command, I get an error referring to TROOT.h not being found, despite it being defined in the header and source files of my code. The error message seen on screen once I try to compile is shown below. Could someone please let me know how to resolve this? Both my root and geant4 are working fine on my mac when I run example codes.
-----------------------
pzw@machintosh$ g4make /Users/pzw/G4WORK/PET_Simulation
-- The C compiler identification is AppleClang 6.0.0.6000051
-- The CXX compiler identification is AppleClang 6.0.0.6000051
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/pzw/G4WORK/PET_Simulation-build
pzw@machintosh$ make -j2
Scanning dependencies of target testPET
[ 20%] Building CXX object CMakeFiles/testPET.dir/src/PETActionInitialization.cc.o
[ 20%] Building CXX object CMakeFiles/testPET.dir/testPET.cc.o
[ 30%] Building CXX object CMakeFiles/testPET.dir/src/PETAnalysisManager.cc.o
In file included from /Users/pzw/G4WORK/PET_Simulation/src/PETAnalysisManager.cc:1:
/Users/pzw/G4WORK/PET_Simulation/include/PETAnalysisManager.hh:6:10: fatal error: 'TROOT.h'
      file not found
#include "TROOT.h"
         ^
In file included from /Users/pzw/G4WORK/PET_Simulation/testPET.cc:42:
/Users/pzw/G4WORK/PET_Simulation/include/PETAnalysisManager.hh:6:10: fatal error: 'TROOT.h'
      file not found
#include "TROOT.h"
         ^
1 error generated.
make[2]: *** [CMakeFiles/testPET.dir/src/PETAnalysisManager.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
1 error generated.
make[2]: *** [CMakeFiles/testPET.dir/testPET.cc.o] Error 1
make[1]: *** [CMakeFiles/testPET.dir/all] Error 2
make: *** [all] Error 2
pzw@machintosh$

Cheers, Pete

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: linking geant4 with root   (Ivana Hrivnacova - 12 Nov, 2015)
(_ None: Re: linking geant4 with root   (Pete Wu - 17 Nov, 2015)
(_ None: Re: linking geant4 with root   (Ivana Hrivnacova - 18 Nov, 2015)
1 None: Re: linking geant4 with root   (Pete Wu - 18 Nov, 2015)
1 None: Re: linking geant4 with root   (Ivana Hrivnacova - 19 Nov, 2015)
... 6 Message(s)
2 None: Re: linking geant4 with root   (xue - 31 Mar, 2016)
 Add Message Add Message
to: "linking geant4 with root"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]