From: Richard <blackw@sfu.ca>
To: pgsql-interfaces@postgresql.org
Subject: Re: [INTERFACES] Linking problems
Date: Fri, 21 Jan 2000 08:35:26 -0800
Message-ID: <38888ACE.926133A9@sfu.ca> (raw)
References: <1BF7C7482189D211B03F00805F8527F748C46C@S-NATH-EXCH2>
Thank-you, Mike. Before posting, I did do some searches on various
pgsql mail lists and rummaged through the docs, but I didn't find any
mention of this. Not to say it isn't there. But if it is, it isn't
very obvious. I'd have expected it to be in the "libpq C++ Binding"
section of the Programmer docs. It isn't.
Last night in I downgraded to 6.5.2, and my test app linked fine WITHOUT
the -lpq option! Is that link option requirement specific to 6.5.3?
Cheers,
Richard
"Ansley, Michael" wrote:
>
> You need to link to libpq as well (-lpq), so this line:
> gcc -o testsql testsql.o -lm -lstdc++ -lpq++
>
> should look like this:
> gcc -o testsql testsql.o -lm -lstdc++ -lpq++ -lpq
>
> Is this on the FAQ somewhere, because I've seen a couple of people asking
> about this?
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: blackw@sfu.ca
Subject: Re: [INTERFACES] Linking problems
In-Reply-To: <38888ACE.926133A9@sfu.ca>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox