Hello,
I can create a database and gave worked with my template1 database. Now, I
want to test the LIBPQ interface with testclib.c. I can compile and run
c/c++ programs, start the postmaster, and use psql successfully. Question:
when I want to compile the testclib.c program( I made sure my header files
in the program were in the correct place and were referred to correctly)
with my command line:
gcc testclib.c -I/usr/include/pgsql -L/usr/include/pgsql/lib -o project
I get the errors(for each database connection function in LIBPQ) :
/tmp/cca003001.o(.text+02xf1):undefined reference PQExec
and so forth for all the functions. Do I need to link any libraries, and
if so what should I look for and how should I do this? Any suggestions?
Thanks
M. Perkowski