Thank you! I got rid of the error, can’t believe it’s because of the syntax…
However, when I run my code, i used compilation command:
g++ -std=c++11 forWong_main.cpp -o forWong `pythia8-config --cppflags --libs --cxxflags --lhapdf` `root-config --cflags --glibs` -L/usr/lib/x86_64-linux-gnu/root5.34 -lEGPythia8 -lLHAPDF
It compiles successfully and then I run the executable with the following command:
./forWong forWong.cmnd > forWong.out
Then I get
./forWong: error while loading shared libraries: libpythia8.so: cannot open shared object file: No such file or directory
Makefile:7: recipe for target 'run' failed
make: *** [run] Error 127
Then I saw this thread Pythia example does not work and I tried the command
ldd `root-config --libdir`/libEG*so | grep -i pythia
I got
/home/killua/root/lib/libEGPythia8.so:
libpythia8.so => not found
So I tried find ${PYTHIA8} -name "lib[pP]ythia*" -print
Then got
/home/killua/pythia/pythia-build/lib/libpythia8.so
/home/killua/pythia/pythia-build/lib/archive/libpythia8.a
Can you please let me know how to proceed?
Thank you very much!!!