Hi, Igor Korot wrote: > This is what Gentoo generates: > ... > /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. > -I/home/igor/dbhandler/libpostgres -I.. -D__WXGTK__ > -I../../dbinterface `pg_config --includedir` -g -O0 -MT > ... > libtool: compile: g++ -DHAVE_CONFIG_H -I. > -I/home/igor/dbhandler/libpostgres -I.. -D__WXGTK__ > -I../../dbinterface /usr/include/postgresql-14 -g -O0 -MT > ... > g++: warning: /usr/include/postgresql-14: linker input file unused > because linking not done
I looks like `pg_config --includedir` expanded to /usr/include/postgresql-14 and the compiler takes it for a linker file. (I assume it's a directory.) > And hi i Debian afe fiing he innclde line: > ... > /bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H > -I. -I../../libpostgres -I.. -D__WXGTK__ -I../../dbinterface > `pg_config --includedir` -g -O0 -MT > ... > libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../libpostgres -I.. > -D__WXGTK__ -I../../dbinterface /usr/include/postgresql -g -O0 -MT > ... > ../../libpostgres/database_postgres.cpp:22:10: fatal error: > libpq-fe.h: No such file or directory So the lists of include directories generated by libtool differ. On Gentoo: . /home/igor/dbhandler/libpostgres .. ../../dbinterface On Debian . ../../libpostgres .. ../../dbinterface On both the output of pg_config is not properly marked by -I. Can it be that on Gentoo there is a file /home/igor/dbhandler/libpostgres/libpq-fe.h ? ------------------------------------------------------------------ Whatever, try to fix your Makefile.am by adding "-I". Like in libpostgres_la_CXXFLAGS = -D__WXGTK__ \ -I../../dbinterface \ -I`pg_config \ --includedir` Have a nice day :) Thomas