/usr/bin/ld: warning...

I get the message

/usr/bin/ld: warning: libX11.so.6, needed by libMyLib.so, not found (try
using --rpath)

when I try to link to my shared lib libMyLib.so.
However, the linked executable works fine.

I include /usr/lib in the library path: -L/usr/lib, and in /usr/lib, there
is libX11.so.6.
What’s wrong?
Markus

Markus Loffler <loffler@ces.clemson.edu> wrote:

I get the message

/usr/bin/ld: warning: libX11.so.6, needed by libMyLib.so, not found (try
using --rpath)

It looks like libMyLib.so needs libX11.so.6, and that you need to specify
the path to libX11.so.6 using the ‘–rpath’ command line argument to
the linker. It is like the ‘-L’ arg, except it is for shared objects
required by other shared objects.

–rpath /usr/X11R6/lib

Try it and let us know.

Regards,
GP

when I try to link to my shared lib libMyLib.so.
However, the linked executable works fine.

I include /usr/lib in the library path: -L/usr/lib, and in /usr/lib, there
is libX11.so.6.
What’s wrong?
Markus


Graeme Peterson
QNX Tools Group
gp@qnx.com