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

Re: More ncurses...

> To clarify:  The library itself (libncurses.so.3.0) is staying right where
> it is (/lib).  The symbolic link (libncurses.so) that is used for
> compiling is being moved to (/usr/lib), so as to help ld (apparently ld is
> getting confused about having the .a file in one place and the .so file in
> another --- David Engel's got the details). 

The reason for doing this is because of the way ld searches for
libraries.  When -static is not specified, ld stops looking at the
first directory that contains either a shared or a static library.  So
for example, if the libfoo.so link is in /lib, libfoo.a is in /usr/lib
and someone invokes ld with '-L/usr/lib -lfoo', ld will find libfoo.a
first and use it instead of libfoo.so.  This is probably not what was
desired.  The simple solution is to put the libfoo.so link in the same
directory with libfoo.a.

David Engel                        Optical Data Systems, Inc.
david@ods.com                      1101 E. Arapaho Road
(214) 234-6400                     Richardson, TX  75081

Reply to: