On Wed, Sep 06, 2000 at 07:57:21PM -0400, Daniel Barclay wrote: > > > From: Juli-Manel Merino Vidal <[EMAIL PROTECTED]> > > > > > On Tue, Sep 05, 2000 at 11:42:51PM -0400, Daniel Barclay wrote: > > > > Simply because the -l option links static libraries, those which end > > in .a and not dynamic ones (.so). > > > > When you try to compile with libcrypt, it not uses the one in /lib; it > > uses the /usr/lib/libcrypt.a instead. > > Are you sure? The ldd command seems to show that it established > a dynamic link: > > > $ gcc test.c -ldb > $ ldd a.out > --> libdb.so.3 => /lib/libdb.so.3 (0x40017000) > libc.so.6 => /lib/libc.so.6 (0x40052000) > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) > $ gcc test.c -ldb1 > $ ldd a.out > --> libdb.so.2 => /lib/libdb.so.2 (0x40017000) > libc.so.6 => /lib/libc.so.6 (0x40025000) > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) > $ gcc test.c -ldb2 > /usr/bin/ld: cannot find -ldb2 > collect2: ld returned 1 exit status > $ ldd a.out > ldd: can't open a.out (No such file or directory) > $ > > > Or are .a libraries needed at compile/link time to establish > the dynamic linking to .so libraries that are fully linked > at run time?
Don't know, but the -l option looks for .a libraries, not .so. Maybe "info gcc" can help you more here. Bye! > > > Thanks, > Daniel > -- > Daniel Barclay > [EMAIL PROTECTED] > (Hmm. A little worrisome: http://www.junkbusters.com/cgi-bin/privacy > http://www.anonymizer.com/snoop.cgi ) > > > -- > Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] < /dev/null -- Juli-Manel Merino Vidal Email: [EMAIL PROTECTED] Homepage: http://jmmv.cjb.net