However, as I still cannot run the macro I decided to reinstall PYTHIA8 and then install ROOT so I can enable build options when building ROOT. So I have installed PYTHIA 8.180 with shared library enabled and ROOT 5.34.36 with pythia8 build option enabled. I tried pythia8.c in /root/tutorials/pythia and it worked out so I think PYTHIA8 could work as a plugin of ROOT.
However, when I run my macro, according to the makefile I should compile with the command make (it’s written by somebody else, so I am not exactly sure what to do) and I got the same error as the post says:
forWong_main.cpp:1:10: fatal error: Pythia8/Pythia.h: No such file or directory
#include "Pythia8/Pythia.h"
^~~~~~~~~~~~~~~~~~
compilation terminated.
Makefile:2: recipe for target 'main' failed
make: *** [main] Error 1
I think I have set my environment variables correctly, that in my .bashrc file I have:
That’s right. Your pythia8 is not properly configured. I do no know what “pythia8-config” is supposed to return but for sure you should get “-I/home/killua/pythia8180/include” inside.
Just to be safer here, is it okay for me to rebuild PYTHIA8 without rebuilding ROOT? It should be okay right, since I configured ROOT before. Thank you!
You should unpack the source code (and build it) in a completely different directory (note: “rm -rf /home/killua/pythia8180/” before configuring it again).
Thank you very much, now my code compiles and it runs.
I know this is a PYTHIA issue, but I tried to google it and could not find anything helpful, so I had to bother you here, if you have any clue. I got error message:
PYTHIA Error from LHAPDF::init: you try to use LHAPDF but did not link it
PYTHIA Error in Pythia::init: could not set up PDF for beam A ```