Re: erros when making examples in /src/test/examples - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: erros when making examples in /src/test/examples
Date
Msg-id 20020530224359.B12668@svana.org
Whole thread Raw
In response to erros when making examples in /src/test/examples  (Wei Wang <Wei.Wang@cl.cam.ac.uk>)
Responses Re: erros when making examples in /src/test/examples
List pgsql-general
On Thu, May 30, 2002 at 01:11:22PM +0100, Wei Wang wrote:
> Hi,
>
>
> I am just trying to make the frontend programs in /src/test/examples
>
> make all gives errors:
>
>
> gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpq -I../../../src/include
-Wl,-rpath,/local/scratch-1/ww220/postgresql-7.1.3/lib testlibpq.c   -o testlibpq 

You need a -lpq in there somewhere.

> Afte searching on the net, I added -lpq but the result is not positive:
>
> gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpq -I../../../src/include
testlibpq.c  -o testlibpq -lpq 
> testlibpq.c: In function `exit_nicely':
> testlibpq.c:14: warning: implicit declaration of function `exit'
> /usr/bin/ld: cannot find -lpq
> collect2: ld returned 1 exit status

Did you install it? Look around for a file named libpq.so. Add an option
-L/directory/containing/that/lib after the -I options.

HTH,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Canada, Mexico, and Australia form the Axis of Nations That
> Are Actually Quite Nice But Secretly Have Nasty Thoughts About America

pgsql-general by date:

Previous
From: Wei Wang
Date:
Subject: erros when making examples in /src/test/examples
Next
From: Wei Wang
Date:
Subject: Re: erros when making examples in /src/test/examples