When I used -Bstatic -lfsu ... etc I expected that libfsu.a to be used to
staticall link to my application. However, in runtime, I found that the
application barfed looking for libfsu.so...which was strange at that time.
Then, after digging in more, found that if LD_LIBRARY_PATH env variable is set
such that the directory where the shared object equivalent of libfsu.a, that is
libfsu.so..., is defined earlier than the directory where libfsu.a is defined,
then the linker seems to be linking the shared object instead of the static
libfsu.a. This causes for undefined shared object variables or undefined shared
objects errors to be generated during runtime execution. Now I thought -Bstatic
usage should ensure that the libraries mentioned after the word are statically
linked. Please enlighten me on this. The problem disappeared when I put in the
static library directory in front of the shared object library directory in
LD_LIBRARY_PATH env variable. Your help will be greatly appreciated.
This message posted from opensolaris.org