Re: Postgres and port unavailable? - Mailing list pgsql-interfaces

From matthew e perkowski cis stnt
Subject Re: Postgres and port unavailable?
Date
Msg-id Pine.SOL.3.95.980416192238.16043A-100000@megahertz.njit.edu
Whole thread Raw
List pgsql-interfaces
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



pgsql-interfaces by date:

Previous
From: Stephen Davies
Date:
Subject: Re: ODBC driver
Next
From: The Hermit Hacker
Date:
Subject: Re: [INTERFACES] ODBC 6.3.2