Hi, how about this theory:
https://gcc.gnu.org/onlinedocs/cpp/Invocation.html#Invocation says "-I dir Add the directory dir to the list of directories to be searched for header files during preprocessing." Note the the singular "dir", not "dirs". In Igor Korot's Makefile.am we see libpostgres_la_CXXFLAGS = -D__WXGTK__ \ -I../../dbinterface \ `pg_config \ --includedir` which is supposed to a set the variable libpostgres_la_CXXFLAGS to -D__WXGTK__ -I../../dbinterface /usr/include/postgresql It appears that an argument -I is missing before /usr/include/postgresql. -------------------------------------------------------------------- I tested with a small dummy program which does: #include "test1.h" #include "test2.h" There are dummy header files: test/include/test_2_dir/test1.h test/include/test_2_dir/test2.h Then i try cc -g -Itest/include/test_1_dir test/include/test_2_dir -o t t.c which complains t.c:19:19: fatal error: test2.h: No such file or directory #include "test2.h" ^ compilation terminated. I.e. it does not mention the surplus argument test/include/test_2_dir before it ends. This run succeeds: cc -g -Itest/include/test_1_dir -Itest/include/test_2_dir -o t t.c -------------------------------------------------------------------- If my theory is right, then the question arises why it works with Igor Korot's Gentoo installation. man gcc proposes as suspects: CPATH C_INCLUDE_PATH CPLUS_INCLUDE_PATH OBJC_INCLUDE_PATH Each variable's value is a list of directories separated by a special character, much like PATH, in which to look for header files. Have a nice day :) Thomas