Re: Can not find -lpq

From: Rynell Wesson <rwesson(at)cs(dot)utexas(dot)edu>
To: Eduardo Kotujansky <eduardo(at)complex(dot)com(dot)br>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Can not find -lpq
Date: 2000-11-28 00:26:15
Message-ID: Pine.LNX.4.21.0011271806330.7626-100000@isle-of-jura.cs.utexas.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

It looks like it's having problems finding where your shared objects,
archives, etc. are located. They should be under <postgresql path>/lib
or wherever you installed them.

Try:

c++ -g -O2 -o everestserver main.o -L <postgresql path>/lib -lpq

I don't know what your makefile looks like, but you may want to be sure
that it includes any of your header file directories as well with
something like:

c++ -I <postgre include directory> -g -O2 -o everestserver main.o -L
<postgresql path>/lib -lpq

Also, be sure to set your LD_LIBRARY_PATH environment variable to your
postgre library path.

(csh, tcsh shells)
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/<postgresql path>/lib

OR

(sh, ksh, bash shells)
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/<postgresql path>/lib
export LD_LIBRARY_PATH

Thanks.

Rynell Wesson

On Mon, 27 Nov 2000, Eduardo Kotujansky wrote:

> Iam with a problem to compile a C program that uses
> postgres. I am on FreeBSD with Potgsresql installed
> in usr/local/pgsql.
>
> any help?
>
> compile messages:
>
>
> make all-recursive
> Making all in everestserver
> Making all in docs
> Making all in en
> c++ -g -O2 -o everestserver main.o -lpq
> /usr/libexec/elf/ld: cannot find -lpq
> *** Error code 1
>
> Stop in /root/rewq/everestserver.
> *** Error code 1
>
> Stop in /root/rewq/everestserver.
> *** Error code 1
>
> Stop in /root/rewq.
> *** Error code 1
>
> Stop in /root/rewq.
>
>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Thomas Lockhart 2000-11-28 08:06:49 Re: Re: FWD: tinterval vs interval on pgsql-novice
Previous Message Eduardo Kotujansky 2000-11-27 19:41:20 Can not find -lpq