home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / programm / 4345 < prev    next >
Encoding:
Text File  |  1992-08-17  |  1.6 KB  |  43 lines

  1. Newsgroups: comp.unix.programmer
  2. Path: sparky!uunet!orca!javelin.sim.es.com!Endor!jwilliam
  3. From: jwilliam@endor.sim.es.com (Jerry Williams x2562)
  4. Subject: cc ld on ix386
  5. Message-ID: <jwilliam.714106395@Endor>
  6. Summary: help
  7. Keywords: libraries, linking
  8. Sender: news@javelin.sim.es.com
  9. Nntp-Posting-Host: endor.sim.es.com
  10. Organization: Evans & Sutherland Computer Corporation
  11. Date: Tue, 18 Aug 1992 02:53:15 GMT
  12. Lines: 29
  13.  
  14. I am trying to understand more about cc and ld on an Interactive Unix
  15. sysV rel 3.2.  If I take the hello world program and use:
  16. cc -o hello hello.c this works fine.
  17. If I do something like:
  18. cc -g hello.c I get a hello.o
  19. and when I try:
  20. ld -o hello hello.o    I get a couple of errors saying that it can't find
  21. things like printf and exit.  So I think that I need to link them with
  22. some libraries but I don't know what.  Everything that I have tried doesn't
  23. work.  So I would like to know what cc is doing that ld isn't.
  24. Another thing that I am trying to do is use sockets.  So I would also like
  25. to know what I have to link to a program to get things like:
  26. socket, inet_addr, connect, bzero.
  27. to be defined.
  28.  
  29. Thanks!  Please send me email as I might miss a post.
  30.  
  31. Also I hope that this is the right group to post this to.  If not please
  32.  
  33. help me find the right group thanks again.  Also is there a way to use
  34.  
  35. nm or something like it to tell which libraries to link with a program?
  36.  
  37.  
  38. -- 
  39.  
  40. Jerry Williams @ Evans & Sutherland  560 Arapeen Drive, SLC, Utah 84108
  41. jwilliam@endor.sim.es.com     or   jwilliam%endor@sim.es.com
  42. ..sim.es.com!endor!jwilliam  or   {decwrl, utah-cs}!esunix!jwilliam
  43.