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

Re: shared library tutorial? [db]



> From: "Kevin M. Bealer" <kmb203@psu.edu>


...
> >Can anyone point me to an online reference on how to compile and use
> >shared libraries?...
> 
> I don't know anything about the portability side but this seems
> to work for me:
> 
...
> $ gcc --shared -o libgrunt.so tercated.c
> 
> (as root)
> # cp libgrunt.so /usr/local/lib/
> # ldconfig -v
> 
> $ gcc -o sophis sophis.c -lgrunt
> $ ./sophis
> Hello world.

How can you get to the shared library if you don't put it in /usr/local/lib?
Does LD_LIBRARY_PATH work on Debian Linux?  

I just noticed that the ld.so manual page says that ld.so is for a.out
binaries.  Where is information on the loading process for ELF binaries?


Thanks,
Daniel
-- 
Daniel S. Barclay      Compass Design Automation, Inc.
daniel@compass-da.com  Suite 100, 5457 Twin Knolls Rd.  Columbia, MD 21045 USA


Reply to: