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

More shared lib stuff



Thanks for the quick turnaround on my question about the benefits of
shared libs. Now for the next problem.

Well, I think I have got my shared lib built, I have run ldconfig but when
I try to compile a program that uses routines in the shared lib, I get

/tmp/cca024781.o: In function `main':
/tmp/cca024781.o(.text+0x51): undefined reference to `btopen'
/tmp/cca024781.o(.text+0x6d): undefined reference to `btperror'
etc.

to compile the program, I followed the elf-howto and just did a
gcc -o example example.c

ldconfig -v shows
ldconfig: version 1.8.8
/lib:
        libdl.so.1 => libdl.so.1.8.8
        libbtree.so.1 => libbtree.so.1.0
etc.

I have tried various combinations of -shared in gcc and ld.
What did I do wrong?

Again, TIA
--
Walter L. Preuninger II                       waldo @ irc.wasteland.org:#unix
walterp@rapidramp.com                           http://walterp.rapidramp.com

                  L  I  N  U  X  Where You Will Want To Be!



Reply to: