Re: erros when making examples in /src/test/examples

From: Wei Wang <Wei(dot)Wang(at)cl(dot)cam(dot)ac(dot)uk>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Wei(dot)Wang(at)cl(dot)cam(dot)ac(dot)uk, pgsql-general(at)postgresql(dot)org
Subject: Re: erros when making examples in /src/test/examples
Date: 2002-05-30 16:14:16
Message-ID: 20020530171416.712c6ff6.ww220@cl.cam.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Great thanks.

But if I am not root, hence no access to /etc/ld.so.conf, where should I specify such libraries for the programs to look for?

Wei

On Thu, 30 May 2002 23:42:48 +1000
Martijn van Oosterhout <kleptog(at)svana(dot)org> wrote:

> On Thu, May 30, 2002 at 01:53:19PM +0100, Wei Wang wrote:
> > 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?
>
> The PATH variable list directories to look for *programs*. So that's
> different. -L tells the compiler where to look for libraries while linking.
> And if you add that directory to /etc/ld.so.conf (if supported by your
> dynamic linker) then you don't need the -rpath bit either.
>
> --
> 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
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-05-30 16:33:53 Re: Scaling with memory & disk planning (was Re: Non-linear Performance)
Previous Message Wei Wang 2002-05-30 16:09:40 postgresql/php/apache installation question.