Thread: Libpq error: Undefined symbols ?

Libpq error: Undefined symbols ?

From
Stéphane Pinel
Date:
Trying to compile one of the libpq sample from the postgresql website,
I get this error :

"ld: Undefined symbols:
_PQclear
_PQerrorMessage
_PQexec
_PQfinish
_PQfname
_PQgetvalue
_PQnfields
_PQntuples
_PQresultStatus
_PQsetdbLogin
_PQstatus"

I can't figure out why ?

MacOS X 10.2.4
PostgreSQL 7.3

Thanks

------------------------------------------------------------------------
---
Stéphane
iChat/AIM: s.pinel
------------------------------------------------------------------------
---

Re: [INTERFACES] Libpq error: Undefined symbols ?

From
Tom Lane
Date:
=?ISO-8859-1?Q?St=E9phane_Pinel?= <spinel@noos.fr> writes:
> Trying to compile one of the libpq sample from the postgresql website,
> I get this error :

> "ld: Undefined symbols:
> _PQclear
> _PQerrorMessage

Looks like you forgot to link in libpq (-lpq on the command line that
produces the executable; you may also need -L to point to the directory
containing the library file).

            regards, tom lane