"Steve M. Robbins" <[EMAIL PROTECTED]> 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