Hello, I am currently taking a Computational physics course and in my school lab computers I can run makefile without any issues.
I have installed ROOT on my ~/ROOT on my personal computer and I have the following in my .bashrc
#Loading Root thisroot.sh in /HOME/ROOT/bin/thisroot.sh
#Below is the experimental library path to make the system to work.
#Did not work, 24 Sept 14.
#Loading the Python parts to load and be able to import from Pydocs in HOME
#Allows modules loaded on Pydocs to be imported without hassle
#Setting up PyROOT
#Unsure of the effects conflicts possibly made with the above So Far no effect. ///3 July 2014 SJL
and in my .rootrc
#Above calls for the roo macropaths
#Second fraction calls for where they are called
#They are separated by “:” “.” refers to the current directory, Second for Rootdocs and third for the default called from TBrowser
if I try to compile one of the codes written by my professor I get the following error on my personal computer:
root-config --cflags app4.cpp
g++ -o runNtuple
root-config --glibs app4.o
app4.o: In function
main': app4.cpp:(.text+0x70): undefined reference toTFile::TFile(char const*, char const*, char const*, int)'
app4.cpp:(.text+0xcd): undefined reference to
TH1F::TH1F(char const*, char const*, int, double, double)' app4.cpp:(.text+0x12a): undefined reference toTH1F::TH1F(char const*, char const*, int, double, double)'
app4.cpp:(.text+0x15b): undefined reference to
TNtuple::TNtuple(char const*, char const*, char const*, int)' app4.cpp:(.text+0x32e): undefined reference toTObject::operator delete(void*)‘
app4.cpp:(.text+0x33e): undefined reference to
TObject::operator delete(void*)' app4.cpp:(.text+0x34e): undefined reference toTObject::operator delete(void*)‘
app4.cpp:(.text+0x35e): undefined reference to
TObject::operator delete(void*)' app4.o: In function__static_initialization_and_destruction_0(int, int)’:
app4.cpp:(.text+0x3db): undefined reference to
TVersionCheck::TVersionCheck(int)' app4.o: In functionTObject::operator new(unsigned long)’:
app4.cpp:(.text._ZN7TObjectnwEm[_ZN7TObjectnwEm]+0x14): undefined reference to `TStorage::ObjectAlloc(unsigned long)'
collect2: error: ld returned 1 exit status
make: *** [runNtuple] Error 1
I’ve been told that this has something to do with the environmental variables, I have searched for a solution online for some time and I am yet to find a definite solution…
Any help will be appreciated.
Thank you for your time