home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / programm / 5240 < prev    next >
Encoding:
Text File  |  1992-11-10  |  1.0 KB  |  34 lines

  1. Newsgroups: comp.unix.programmer
  2. Path: sparky!uunet!think.com!ames!agate!stanford.edu!EE.Stanford.EDU!tse
  3. From: tse@leland.stanford.edu (Eric Tse)
  4. Subject: How do I make dynamic link libraries?
  5. Message-ID: <1992Nov11.004546.15671@EE.Stanford.EDU>
  6. Sender: usenet@EE.Stanford.EDU (Usenet)
  7. Organization: Stanford University
  8. X-Newsreader: Tin 1.1 PL5
  9. Date: Wed, 11 Nov 92 00:45:46 GMT
  10. Lines: 22
  11.  
  12. Hi,
  13.     I am new to dynamic-link libraries and wonder how I can 
  14. create one. For example, if I want to make f1.o f2.o into a 
  15. libtest.so.0.1, do I do:
  16.     ld -Bdynamic f1.o f2.o -o libtest.so.0.1
  17. ?
  18.     Then if I want to compile a programm a.out originally
  19. using f1.o and f2.o, do I do:
  20.     cc -Bdynamic -o a.out other1.o other2.o libtest.so.0.1
  21. ?
  22.     If I want to execute a.out, do I have to
  23.     setenv LD_LIBRARY_PATH /path_of_the_so
  24. before I run a.out?
  25.  
  26. But it does not work! Any help? Please?
  27.  
  28.  
  29. --
  30. ========================================================================
  31. Eric Tse
  32. tse@leland.stanford.edu
  33. ========================================================================
  34.