ROOT Version: Not Provided Platform: ubuntu 20.04 Compiler: Not Provided
Hi, I’m trying to run a pythia code and I get this error: a.cc:3:10: fatal error: Pythia8/Pythia.h: No such file or directory
3 | #include “Pythia8/Pythia.h”
and this is the path: /pythia/pythia8307/include/Pythia8/Pythia.h
and this is my C++ code:
ls -al /home/pythia ls -al /home/pythia/pythia8307 ls -al /home/pythia/pythia8307/include ls -al /home/pythia/pythia8307/include/Pythia8 ls -al /home/pythia/pythia8307/lib
Uhm weird, then -I/home/pythia/pythia8307/include should work. Indeed you might want to check that the path contains the expected files as @Wile_E_Coyote suggests.
this is not really a ROOT-related question: the compiler cannot find the header file because as you can see from the compilation command that make a triggers the -I compiler flag is missing: g++ a.cc -o a.
The pattern rule described in line 1 of your Makefile is not used; instead make is using an implicit rule to build the target, which obviously does not include all the additional command line options that you added. You might want to take a look also to Pattern Rules (GNU make).
Additionally, there are some other issues:
There should be no whitespace separating the -I compiler option and its argument
These paths should probably be absolute; you can consider using variables for this.