GRIFFINCollaboration / detectorSimulations

GEANT4 simulation code for the GRIFFIN array and it's suite of ancillary detection systems.
7 stars 13 forks source link

Code not compiling #77

Closed r3dunlop closed 10 years ago

r3dunlop commented 10 years ago

The current version of the code is not compiling on my computer giving the error:

In file included from /mnt/hgfs/swap/geant4-programs/geant4/detectorSimulations/src/MapEvent.cc:1: /mnt/hgfs/swap/geant4-programs/geant4/detectorSimulations/include/MapEvent.h:23:37: error: Math/InterpolationTypes.h: No such file or directory /mnt/hgfs/swap/geant4-programs/geant4/detectorSimulations/include/MapEvent.h:24:31: error: Math/Interpolator.h: No such file or directory /mnt/hgfs/swap/geant4-programs/geant4/detectorSimulations/src/MapEvent.cc: In member function ‘Double_t MapEvent::GetPrimaryEnergyForID(int)’: /mnt/hgfs/swap/geant4-programs/geant4/detectorSimulations/src/MapEvent.cc:140: warning: converting to ‘int’ from ‘double’ make[2]: * [CMakeFiles/detectionSystems.dir/src/MapEvent.cc.o] Error 1 make[1]: * [CMakeFiles/detectionSystems.dir/all] Error 2 make: *\ [all] Error 2

I can compile by commenting out

include "Math/InterpolationTypes.h"

include "Math/Interpolator.h"

It seems these headers are missing from the repository?

bkatiemills commented 10 years ago

Ah yes, the infamous interpolator error - see issue #66 . 66 is a very, very long thread, so before you start wading through it:

-Do you have the most recent version of the code? -Are you following the build instructions recently added to the readme on the front page of this repo (there is another step in addition to the usual geant4 build process - have a look there).

If yes to both and it still doesn't compile, let me know.

r3dunlop commented 10 years ago

Things are "ok" now. I am experiencing weirdness though. I originally compiled the code as per the instructions. I commented out those lines and was able to compile. I then reimplemented the "Math/*.h" include statements, and ran a make clean. The next time I tried to compile, it worked! Maybe I'm being crazy??

bkatiemills commented 10 years ago

It's hard to tell. Definitely leave all that stuff alone if it isn't necessary to change it for what you're doing - it's confirmed to compile as is, and it sounds like you're up and running now, so best to just back away slowly.