Re: [INTERFACES] Re: Postgres and port unavailable?

From: Peter T Mount <pgint(at)maidast(dot)demon(dot)co(dot)uk>
To: matthew e perkowski cis stnt <mep5772(at)megahertz(dot)njit(dot)edu>
Cc: PostgreSQL Interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: [INTERFACES] Re: Postgres and port unavailable?
Date: 1998-04-17 16:41:15
Message-ID: Pine.LNX.3.95.980417174047.29749C-100000@maidast.demon.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)earthling(dot)net or pmount(at)maidast(dot)demon(dot)co(dot)uk
Main Homepage: http://www.demon.co.uk/finder
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter(at)maidstone(dot)gov(dot)uk

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message The Hermit Hacker 1998-04-17 17:11:32 Re: [INTERFACES] ODBC 6.3.2
Previous Message Peter T Mount 1998-04-17 16:38:39 Re: [INTERFACES] jdbc fails to compile