Date: Sun, 7 Apr 2002 13:10:58 +0400 (MSD) From: Dmitry Mottl <dima@sinp.msu.ru> To: freebsd-questions@FreeBSD.org Subject: dynamic libraries Message-ID: <Pine.BSF.4.43.0204071309400.45395-100000@BigKing.sinp.msu.ru>
next in thread | raw e-mail | index | archive | help
Hi,
how can I link C program with different versions of the same library?
# /sbin/ldconfig -r | grep ncurses
    5:-lncurses.5 => /usr/lib/libncurses.so.5
    84:-lncurses.3 => /usr/lib/compat/libncurses.so.3
# gcc test.c -lncurses
# ldd a.out
a.out:
    libncurses.so.5 => /usr/lib/libncurses.so.5 (0x28065000)
    libc.so.4 => /usr/lib/libc.so.4 (0x280a7000)
But if I explicitly set version of library:
# gcc test.c -lncurses.5
/usr/libexec/elf/ld: cannot find -lncurses.5
or
# gcc test.c -lncurses.3
/usr/libexec/elf/ld: cannot find -lncurses.3
I have an error. Why?
- Dmitry
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.43.0204071309400.45395-100000>
