home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.programmer
- Path: sparky!uunet!think.com!ames!agate!stanford.edu!EE.Stanford.EDU!tse
- From: tse@leland.stanford.edu (Eric Tse)
- Subject: How do I make dynamic link libraries?
- Message-ID: <1992Nov11.004546.15671@EE.Stanford.EDU>
- Sender: usenet@EE.Stanford.EDU (Usenet)
- Organization: Stanford University
- X-Newsreader: Tin 1.1 PL5
- Date: Wed, 11 Nov 92 00:45:46 GMT
- Lines: 22
-
- Hi,
- I am new to dynamic-link libraries and wonder how I can
- create one. For example, if I want to make f1.o f2.o into a
- libtest.so.0.1, do I do:
- ld -Bdynamic f1.o f2.o -o libtest.so.0.1
- ?
- Then if I want to compile a programm a.out originally
- using f1.o and f2.o, do I do:
- cc -Bdynamic -o a.out other1.o other2.o libtest.so.0.1
- ?
- If I want to execute a.out, do I have to
- setenv LD_LIBRARY_PATH /path_of_the_so
- before I run a.out?
-
- But it does not work! Any help? Please?
-
-
- --
- ========================================================================
- Eric Tse
- tse@leland.stanford.edu
- ========================================================================
-