home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.programmer
- Path: sparky!uunet!orca!javelin.sim.es.com!Endor!jwilliam
- From: jwilliam@endor.sim.es.com (Jerry Williams x2562)
- Subject: cc ld on ix386
- Message-ID: <jwilliam.714106395@Endor>
- Summary: help
- Keywords: libraries, linking
- Sender: news@javelin.sim.es.com
- Nntp-Posting-Host: endor.sim.es.com
- Organization: Evans & Sutherland Computer Corporation
- Date: Tue, 18 Aug 1992 02:53:15 GMT
- Lines: 29
-
- I am trying to understand more about cc and ld on an Interactive Unix
- sysV rel 3.2. If I take the hello world program and use:
- cc -o hello hello.c this works fine.
- If I do something like:
- cc -g hello.c I get a hello.o
- and when I try:
- ld -o hello hello.o I get a couple of errors saying that it can't find
- things like printf and exit. So I think that I need to link them with
- some libraries but I don't know what. Everything that I have tried doesn't
- work. So I would like to know what cc is doing that ld isn't.
- Another thing that I am trying to do is use sockets. So I would also like
- to know what I have to link to a program to get things like:
- socket, inet_addr, connect, bzero.
- to be defined.
-
- Thanks! Please send me email as I might miss a post.
-
- Also I hope that this is the right group to post this to. If not please
-
- help me find the right group thanks again. Also is there a way to use
-
- nm or something like it to tell which libraries to link with a program?
-
-
- --
-
- Jerry Williams @ Evans & Sutherland 560 Arapeen Drive, SLC, Utah 84108
- jwilliam@endor.sim.es.com or jwilliam%endor@sim.es.com
- ..sim.es.com!endor!jwilliam or {decwrl, utah-cs}!esunix!jwilliam
-