Running Pythia8 with ROOT getting fatal error: 'Pythia8/Pythia.h' file not found

Hello Bellenot,

I am sorry that I have new problems. Because I still cannot run the macro I decided to try different versions of PYTHIA and ROOT. So now I have installed PYTHIA 8180 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. I have a virtual machine with Ubuntu 18.04.

However, when I run my macro, according to the makefile I should compile with the command make 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:

export PYTHIA8=/home/killua/pythia8180
export ROOTSYS=/home/ROOT
export PATH=$ROOTSYS/bin:$PATH
export PATH=${PATH}:/home/killua/pythia8180/bin
export LD_LIBRARY_PATH=$ROOTSYS/lib:$PYTHONDIR/lib:$ROOTSYS/bindings/pyroot:$LD$
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/home/killua//pythia8180/lib
export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:/home/killua/pythia8180/lib
export PYTHONDIR=$ROOTSYS
export PYTHIA8DATA=/home/killua/pythia8180/xmldoc
export PATH=${PATH}:/home/killua/pythia8180/bin

I am not sure why I am getting the same error as I did what you’ve told me before, perhaps because of the different versions of ROOT and PYTHIA. However, when I am running the example pythia8.C, it can run although I changed the three lines about SoftQCD:minbias = on according to this thread:Running Pythia8 with ROOT.

I appreciate your time reading this and all your help!