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
export ROOTSYS=$HOME/ROOT/
export PATH=$ROOTSYS/bin:$PATH
export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PAT
#Below is the experimental library path to make the system to work.
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib
#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
export PYTHONPATH=$PYTHONPATH:~/Pydocs
export PYTHON_PATH=$PYTHON_PATH:~/Pydocs
#Setting up PyROOT
export LD_LIBRARY_PATH=$ROOTSYS/lib:$PYTHONDIR/lib:$LD_LIBRARY_PATH
export PYTHONPATH=$ROOTSYS/lib:$PYTHONPATH
#Unsure of the effects conflicts possibly made with the above So Far no effect. ///3 July 2014 SJL
and in my .rootrc
Unix.*.Root.MacroPath: .:$(HOME)/Rootdocs:/opt/local/etc/root/plugins:
#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:
g++ -c root-config --cflags
app4.cpp
g++ -o runNtuple root-config --glibs
app4.o
app4.o: In function main': app4.cpp:(.text+0x70): undefined reference to
TFile::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 to
TH1F::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 to
TObject::operator delete(void*)‘
app4.cpp:(.text+0x33e): undefined reference to TObject::operator delete(void*)' app4.cpp:(.text+0x34e): undefined reference to
TObject::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 function
TObject::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
-SJL