I am trying to compile a source file driver.cxx and among its include files is a library called
The path to this file is /home/terry/Downloads/libodb-2-4-0/odb/sqlite/database.hxx
to compile it I enter the following:
g++ -c driver.cxx -I/home/terry/Downloads/libodb-2.4.0/odb
And get the message
driver.cxx:10:35: fatal error: odb/sqlite/database.hxx: No such file or directory #include ^ compilation terminated.
How do I mention the path when using the -I flag for g++?
According to the error you pasted it looks like your include command is:
If so, your
-I
option should be withoutodb
dir (since it's already mentioned in the include):All in all the
-I
concatenated with the include should be the exact path.Meaning if you decide to include with:
Your
-I
option should be:Again,
-I
+ include = exact path.