I am working in geant4 with root.
how I can solve this problem?
...
localhost.localdomain:/build < 5 >make
Scanning dependencies of target TPC-MC
[ 5%] Building CXX object CMakeFiles/TPC-MC.dir/TPC-MC.cc.o
In file included from /home/local1/Desktop/G4argon/TPC-Simulation/TPC-MC.cc:44::
/home/local1/Desktop/G4argon/TPC-Simulation/include/TPCPrimaryGeneratorAction.hh:10:22: fatal error: TRandom3.h: No such file or directory
#include <TRandom3.h>
it only contained a ‘‘Makefile’’, I had to create a new CMakeFile.txt
Thank you. I was successful with your suggestion now I have another type of error.
…
localhost.localdomain:/build < 9 >cmake -DGeant4_DIR=/usr/local/geant4.10.02.p02 /home/local1/Desktop/G4argon/TPC-Simulation/
– Found ROOT 6.06/02 in /usr/local/root/6.06.02
– Configuring done
– Generating done
– Build files have been written to: /home/local1/Desktop/G4argon/TPC-Simulation/build
localhost.localdomain:/build < 10 >make
[ 5%] Building CXX object CMakeFiles/TPC-MC.dir/src/TPCDetectorConstruction.cc.o
/home/local1/Desktop/G4argon/TPC-Simulation/src/TPCDetectorConstruction.cc: In member function ‘void TPCDetectorConstruction::DefineGeometryParameters()’:
/home/local1/Desktop/G4argon/TPC-Simulation/src/TPCDetectorConstruction.cc:571:18: warning: unused variable ‘dLXeLevelZeroOffset’ [-Wunused-variable]
const G4double dLXeLevelZeroOffset =GetGeometryParameter(“LXeLevelZeroOffset”);
^
/home/local1/Desktop/G4argon/TPC-Simulation/src/TPCDetectorConstruction.cc: In member function ‘void TPCDetectorConstruction::ConstructOuterCryostat()’:
/home/local1/Desktop/G4argon/TPC-Simulation/src/TPCDetectorConstruction.cc:677:69: warning: ISO C++ forbids variable length array ‘pdOuterCryostatBoreFlangeZ’ [-Wvla]
G4double pdOuterCryostatBoreFlangeZ[dOuterCryostatBoreFlangeNumber];
…
/home/local1/Desktop/G4argon/TPC-Simulation/src/TPCDetectorConstruction.cc:677:69: warning: ISO C++ forbids variable length array ‘pdOuterCryostatBoreFlangeZ’ [-Wvla]
The following is no longer permitted:
int len = 5;
double array[len];
Instead you need to make len a const:
const int len = 5;
double array[len];
or use a dynamic c array:
int len = 5;
double *array = new double[len];
//Remember to call delete!