The libpg-fe.h is in /usr/include/pgsql/libpq-fe.h
so i did:
#include "../include/pgsql/libpq-fe.h"
and the message changed:
c++ -O0 -g3 -Wall -o usa_postgresql main.o
main.o: In function `exit_nicely(pg_conn *)':
/root/usa_postgresql/usa_postgresql/main.cpp:13: undefined reference to `PQfinish'
main.o: In function `main':
/root/usa_postgresql/usa_postgresql/main.cpp:47: undefined reference to `PQsetdbLogin'
/root/usa_postgresql/usa_postgresql/main.cpp:52: undefined reference to `PQstatus'
/root/usa_postgresql/usa_postgresql/main.cpp:55: undefined reference to `PQerrorMessage'
/root/usa_postgresql/usa_postgresql/main.cpp:63: undefined reference to `PQexec'
/root/usa_postgresql/usa_postgresql/main.cpp:64: undefined reference to `PQresultStatus'
/root/usa_postgresql/usa_postgresql/main.cpp:67: undefined reference to `PQclear'
/root/usa_postgresql/usa_postgresql/main.cpp:75: undefined reference to `PQclear'
/root/usa_postgresql/usa_postgresql/main.cpp:81: undefined reference to `PQexec'
/root/usa_postgresql/usa_postgresql/main.cpp:82: undefined reference to `PQresultStatus'
/root/usa_postgresql/usa_postgresql/main.cpp:85: undefined reference to `PQclear'
/root/usa_postgresql/usa_postgresql/main.cpp:88: undefined reference to `PQclear'
/root/usa_postgresql/usa_postgresql/main.cpp:89: undefined reference to `PQexec'
/root/usa_postgresql/usa_postgresql/main.cpp:90: undefined reference to `PQresultStatus'
/root/usa_postgresql/usa_postgresql/main.cpp:93: undefined reference to `PQclear'
/root/usa_postgresql/usa_postgresql/main.cpp:98: undefined reference to `PQnfields'
/root/usa_postgresql/usa_postgresql/main.cpp:100: undefined reference to `PQfname'
/root/usa_postgresql/usa_postgresql/main.cpp:104: undefined reference to `PQntuples'
/root/usa_postgresql/usa_postgresql/main.cpp:107: undefined reference to `PQgetvalue'
/root/usa_postgresql/usa_postgresql/main.cpp:110: undefined reference to `PQclear'
/root/usa_postgresql/usa_postgresql/main.cpp:113: undefined reference to `PQexec'
/root/usa_postgresql/usa_postgresql/main.cpp:114: undefined reference to `PQclear'
/root/usa_postgresql/usa_postgresql/main.cpp:117: undefined reference to `PQexec'
/root/usa_postgresql/usa_postgresql/main.cpp:118: undefined reference to `PQclear'
/root/usa_postgresql/usa_postgresql/main.cpp:121: undefined reference to `PQfinish'
collect2: ld returned 1 exit status
gmake: *** [usa_postgresql] Error 1
*** failed ***
I am still in problem.
Eduardo K.