From: | Wei Wang <Wei(dot)Wang(at)cl(dot)cam(dot)ac(dot)uk> |
---|---|
To: | Martijn van Oosterhout <kleptog(at)svana(dot)org>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: erros when making examples in /src/test/examples |
Date: | 2002-05-30 12:53:19 |
Message-ID: | 20020530135319.136758b9.ww220@cl.cam.ac.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thanks a lot.
It works:
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 -L/homes/ww220/myspace/postgresql-7.1.3/lib testlibpq.c -o testlibpq -lpq
testlibpq.c: In function `exit_nicely':
testlibpq.c:14: warning: implicit declaration of function `exit'
I am a total newbie to almost everything. I put
export PATH=/local/scratch-1/ww220/myspace/postgresql-7.1.3/lib:$PATH
in .bash_profile and did ". .bash_profile". Is that different from putting
-L switch in gcc command?
Wei
On Thu, 30 May 2002 22:43:59 +1000
Martijn van Oosterhout <kleptog(at)svana(dot)org> wrote:
> 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(at)svana(dot)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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>
From | Date | Subject | |
---|---|---|---|
Next Message | Darko Prenosil | 2002-05-30 12:57:53 | Re: Error class not found |
Previous Message | Martijn van Oosterhout | 2002-05-30 12:43:59 | Re: erros when making examples in /src/test/examples |