Skip site navigation (1) Skip section navigation (2)

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: (view raw or whole thread)
Lists: pgsql-interfaces

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?


M. Perkowski

pgsql-interfaces by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group