I am trying to compile a piece of code containing ROOT libraries, call it “my_script.cpp”, using gcc. I’m running Max OS 12.7.5 and ROOT version 6.30/04. This is an old script that used to work for me (about three years ago), but I recently found new use for it and only now something has broken. The error I get is:
my_script.cpp:fatal error:‘TROOT.h’ file not found
I have tried explicitly including the full directory path to TROOT.h to resolve this, but then I get the following:
/Users/my_user/opt/anaconda3/envs/CernROOT/include/ROOT/RConfig.hxx:23:10:fatal error:‘RConfigure.h’ file not found
Note that I have installed ROOT using Conda, and I have appropriately activated my conda environment containing ROOT. Prior to this, I had installed ROOT via Homebrew, and got virtually identical errors.
I have also tried re-installing the Xcode command line tools, just in case that would help, but no luck. (Didn’t expect it to.)
What can I do to resolve this? Thanks in advance.
_ROOT Version: 6.30/04
_Platform: Mac OS 12.7.5
_Compiler: gcc
1 warning generated.
Undefined symbols for architecture x86_64:
"___gxx_personality_v0", referenced from:
_main in hello_world-7fd1c7.o
Dwarf Exception Unwind Info (__eh_frame) in hello_world-7fd1c7.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
That error was generated by trying to compile a simple hello_world.cpp program (attached here) hello_world.cpp (353 Bytes) using the following command: