Re: Postgres and port unavailable?

From: matthew e perkowski cis stnt <mep5772(at)megahertz(dot)njit(dot)edu>
To: The Hermit Hacker <scrappy(at)hub(dot)org>
Subject: Re: Postgres and port unavailable?
Date: 1998-04-16 23:22:53
Message-ID: Pine.SOL.3.95.980416192238.16043A-100000@megahertz.njit.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-interfaces by date

  From Date Subject
Next Message Stephen Davies 1998-04-16 23:25:01 subscribe
Previous Message Byron Nikolaidis 1998-04-16 22:33:50 Re: Small patch to compile clean against VC++ 5.0