autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: detecting required libraries in AC_CHECK_LIB


From: Simon Josefsson
Subject: Re: detecting required libraries in AC_CHECK_LIB
Date: 04 Jun 2001 20:40:13 +0200
User-agent: Gnus/5.090004 (Oort Gnus v0.04) XEmacs/21.4 (Academic Rigor)

"Steve M. Robbins" <address@hidden> writes:

> On Mon, Jun 04, 2001 at 05:49:41PM +0200, Peter Eisentraut wrote:
>> Steve M. Robbins writes:
>> 
>> > I expect that one cannot do so in general.  But I'll take a partial
>> > solution, if there is one.  On linux, at least, "ldd libfoo.so" will
>> > tell me which other shared objects libfoo links against, so this
>> > info is embedded in the shared object.
>> 
>> If the info is embedded in the shared object then your work is done
>> because the dynamic loader will automatically load the dependent libraries
>> at run-time.  The case you're concerned about is when this has not been
>> done (shame on that package),
> 
> Well, I'm seeing a linker failure, e.g.
> 
>       /usr/bin/ld: warning: libXext.so.6, needed by /usr/lib/libglut.so, not 
> found (try using -rpath or -rpath-link)
> 
> I interpret this to mean that the shared objects required by libglut.so
> are encoded in it.
...
> The link line, btw, is
> 
>       gcc -g -O2 -o Display ... list of .o files ... 
>       -L/usr/X11R6/lib -lSM -lICE -lglut -lGL -lGLU -lX11 -lXmu -lm
> 
> Thanks for your help,

Does it help to follow the advice given by the error message?

E.g. something like

        gcc -g -O2 -o Display ... list of .o files ... 
        -L/usr/X11R6/lib -Wl,-rpath-link,/usr/X11R6/lib
        -lSM -lICE -lglut -lGL -lGLU -lX11 -lXmu -lm




reply via email to

[Prev in Thread] Current Thread [Next in Thread]