home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / misc / 4105 < prev    next >
Encoding:
Text File  |  1992-11-11  |  1.3 KB  |  44 lines

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