Обсуждение: Big trouble with libpq++

Поиск
Список
Период
Сортировка

Big trouble with libpq++

От
Stéphane EVEILLARD
Дата:
Hello,

Using kdevelop (which uses g++), I got the following message when linking

error in pgconnection.cc PgEXEC not defined.
 
and I ve got the same message for a few others fonctions

Can somebody help me ??

(I'm using Postgresql 7.0.3)

Thanks in advance
Stephane

Re: Big trouble with libpq++

От
"J. T. Vermeulen"
Дата:
On Thu, 15 Mar 2001, Stéphane EVEILLARD wrote:

> Using kdevelop (which uses g++), I got the following message when linking
> 
> error in pgconnection.cc PgEXEC not defined.

Do you mean PQexec?  In that case it looks like libpq (the C frontend) isn't
being linked in properly.  Are you linking statically or dynamically?


Jeroen



Re: Big trouble with libpq++

От
Stéphane EVEILLARD
Дата:
Sorry, I mean PQexec and I am linking statically .

Stephane

----- Original Message -----
From: "J. T. Vermeulen" <jtv@cistron-office.nl>
To: "Stéphane EVEILLARD" <steff33@ifrance.com>
Cc: <pgsql-interfaces@postgresql.org>
Sent: Thursday, March 15, 2001 1:07 PM
Subject: Re: [INTERFACES] Big trouble with libpq++


On Thu, 15 Mar 2001, Stéphane EVEILLARD wrote:

> Using kdevelop (which uses g++), I got the following message when linking
>
> error in pgconnection.cc PgEXEC not defined.

Do you mean PQexec?  In that case it looks like libpq (the C frontend) isn't
being linked in properly.  Are you linking statically or dynamically?


Jeroen


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl



Re: Big trouble with libpq++

От
"J. T. Vermeulen"
Дата:
On Thu, 15 Mar 2001, Stéphane EVEILLARD wrote:

> Sorry, I mean PQexec and I am linking statically .

Okay, that makes things a little easier.  It appears that the Makefile doesn't
do much to account for static linking; the only dependency on libpq that is
specified is through SHLIB_LINK which AFAIK is meant for dynamic libs only.

You should be able to solve this either by linking dynamically, or if you
want to stick with the static version, to link with libpq as well as libpq++.


HTH!


Jeroen



Re: Big trouble with libpq++

От
Tom Lane
Дата:
"J. T. Vermeulen" <jtv@cistron-office.nl> writes:
> You should be able to solve this either by linking dynamically, or if you
> want to stick with the static version, to link with libpq as well as libpq++.

Yes, for a static link you should say-lpq++ -lpq
not only -lpq++.  Actually, I'd tend to do that for a dynamic link
too... can't hurt.
        regards, tom lane