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

From Peter T Mount
Subject Re: [INTERFACES] Re: Postgres and port unavailable?
Date
Msg-id Pine.LNX.3.95.980417174047.29749C-100000@maidast.demon.co.uk
Whole thread Raw
Responses Re: [INTERFACES] Re: Postgres and port unavailable?
List pgsql-interfaces
On Thu, 16 Apr 1998, matthew e perkowski cis stnt wrote:

> 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

Youre missing -lpq. the -L only defines where the libraries are located,
but doesn't tell the linker which ones to use.

gcc testclib.c  -I/usr/include/pgsql -L/usr/include/pgsql/lib -lpq -o project

That should work

--
Peter T Mount  petermount@earthling.net or pmount@maidast.demon.co.uk
Main Homepage: http://www.demon.co.uk/finder
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk



pgsql-interfaces by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: [INTERFACES] ODBC 6.3.2
Next
From: matthew e perkowski cis stnt
Date:
Subject: Re: [INTERFACES] Re: Postgres and port unavailable?