hi
i installed root version 5.32.04 using fixed location installation
and i installed pythia8
i run sample main programs in example subdirectory of pythia8 and i got output.
i run program hist.cc in rootexamples subdirectory (a sample program to show histogram in root format)
and i got histogram in root format .
then i modified a sample main program in examples subdirectory to get its histgram output in root format.
i used
to make executeable file but i got error as:
g++ -O2 -ansi -pedantic -W -Wall -Wshadow mainw71.cc -o mainw71
mainw71.cc:2:28: fatal error: Pythia8/Pythia.h: No such file or directory
compilation terminated.
make: *** [mainw71] Error 1
then i copied file hist.cc from rootexamples to examples
and i typed
cd examples
make hist
i got error as:
g++ -O2 -ansi -pedantic -W -Wall -Wshadow hist.cc -o hist
hist.cc:12:28: fatal error: Pythia8/Pythia.h: No such file or directory
compilation terminated.
make: *** [hist] Error 1
You have to tell the compiler where to find the pythia8 headers, by using the “-I” compiler flag. For example: g++ -O2 -ansi -pedantic -W -Wall -Wshadow -I$PYTHIA8/include mainw71.cc -o mainw71
See for example the “Include Directories” paragraph of Compiling with g++
You have to give the location of those header files on your system. Then those errors will disappear. So please locate PseudoJet.hh, and use this path with the -I compiler flag.
For example, according to your example, it should be in $Fastjet-install/include/fastjet/PseudoJet.hh. If not, then give the correct path and try again.
And you have to do that each time the compiler is complaining about a missing header file.
OK, look: the compiler is looking for “fastjet/PseudoJet.hh” so you should add (with -I)the part of the full path which is missing to find the file.
For example, if your mainw71.cc source file contains #include "fastjet/PseudoJet.hh"
and the full path of PseudoJet.hh is /home/raman/Downloads/fastjet-install/include/fastjet/PseudoJet.hh
You should use -I/home/raman/Downloads/fastjet-install/include
And if your mainw71.cc source file contains #include "PseudoJet.hh"
You should use -I/home/raman/Downloads/fastjet-install/include/fastjet
I hope this clear enough? You really have to understand how all this works, and take some course or tutorials, otherwise we will never manage…