You have to link against libPythia8 (-L$PYTHIA8/lib -lPythia8) and some of the ROOT libraries (using ‘root-config --glibs’). See for example [url=https://root-forum.cern.ch/t/compiling-root-script-with-g/15120/3 thread[/url], or just search on this forum, there are probably several examples…
[color=#FF0000]EDITED:[/color]
And please, don’t post several times the same question in different threads.
And you should probably ask one of your colleagues to explain how all this work. It is much better to look at this in front of a computer than exchanging posts on a forum…
You know you should really try to search and find solutions by yourself at some point… There are several posts on this forum asking the same kind of question, and you can easily search the forum with the “search” entry on the top right corner…
And to answer your question (just in case you didn’t find it by yourself), you have this error because $ROOTSYS/lib is not in the LD_LIBRARY_PATH. You have to execute the “thisroot.sh” (or thisroot.csh) script located in $ROOTSYS/bin, as explained for example in Installing ROOT from Source page.
And to make sure you read the right part of it, here is what it says:
Add bin/ to PATH and lib/ to LD_LIBRARY_PATH. For the sh shell family do:
. bin/thisroot.sh
and for the csh shell family do:
source bin/thisroot.csh
And please, keep the original file name, and don’t rename it with .exe
is:
/home/raman/Downloads/root/bin:/home/raman/Downloads/root/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
and the output of
is:
/home/raman/Downloads/fastjet-install/lib:LD_LIBRARY_PATH
See[quote=“raman”]and the output of
CODE: SELECT ALL
echo $LD_LIBRARY_PATH
is:
/home/raman/Downloads/fastjet-install/lib:LD_LIBRARY_PATH[/quote]
See? [color=#0000FF]/home/raman/Downloads/root/lib[/color] is missing from your $LD_LIBRARY_PATH… If you fix that everything will work.
is:
/home/raman/Downloads/root/lib:/home/raman/Downloads/fastjet-install/lib:LD_LIBRARY_PATH:/home/raman/Downloads/pythia8176/lib:/home/raman/Downloads/root/lib