Subject: Re: X library path, etc.
To: Peter Seebach <>
From: Johan Danielsson <>
List: current-users
Date: 01/15/2002 20:26:33 (Peter Seebach) writes:

> This has poor scaling.  e.g., I don't want to make a new package for
> every single IOCCC entry I download, but none of them are going to
> have -Wl,-R... in their makefiles just because one system in all the
> world doesn't guess that by default.  :)

There are quite a few systems where -L does not imply -R, it's just
that most have the X directory in the default search path for

$ uname -a
OSF1 xx V5.0 1094 alpha
$ echo 'foo(){}' > foo.c
$ echo 'main(){foo();}' > bar.c
$ cc -c foo.c 
$ cc -shared -o foo.o
$ cc -o bar bar.c -L/tmp -lfoo
$ ldd bar
cannot map <-- fatal error
$ cc -o bar bar.c -L/tmp -Wl,-rpath,/tmp -lfoo
$ ldd bar
      Main  => bar  => /tmp/  => /usr/shlib/