Can not find -lpq
Can not find -lpq
От:
"Eduardo Kotujansky" <eduardo@complex.com.br>
Дата:
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.
Re: Can not find -lpq
От:
Rynell Wesson <rwesson@cs.utexas.edu>
Дата:
It looks like it's having problems finding where your shared objects,
archives, etc. are located. They should be under /lib
or wherever you installed them.
Try:
c++ -g -O2 -o everestserver main.o -L /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 -g -O2 -o everestserver main.o -L
/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}://lib
OR
(sh, ksh, bash shells)
LD_LIBRARY_PATH=${LD_LIBRARY_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.
>
>