Hi,
sorry, for possible offtopic, but freebsd-question said nothing

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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to