home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!know!hri.com!noc.near.net!nic.umass.edu!caen!sdd.hp.com!news.cs.indiana.edu!umn.edu!news.d.umn.edu!ub.d.umn.edu!not-for-mail
- From: rhealey@ub.d.umn.edu (Rob Healey)
- Newsgroups: comp.unix.amiga
- Subject: Re: Problem at linking programs
- Message-ID: <1duitjINN803@ub.d.umn.edu>
- Date: 12 Nov 92 21:38:59 GMT
- References: <1992Nov12.125820.11876@tom.rz.uni-passau.de>
- Organization: University of Minnesota, Duluth
- Lines: 30
- NNTP-Posting-Host: ub.d.umn.edu
-
- In article <1992Nov12.125820.11876@tom.rz.uni-passau.de> hessmann@unipas.fmi.uni-passau.de (Georg Hessmann) writes:
- =I've written a program which uses ioctl() and mmap().
- =If I compile it with gcc, I get the following missing
- =symbols while linking:
- =select, syslog, seteuid all from /usr/lib/libsocket.so
- =I've tried all link libraries, but the errors remain.
- =
- Hmmm, you might need the -lnsl library.
-
- =Only if I compile it with /usr/ucb/cc no errors
- =occure.
- =
- YIKES!!!!! You just linked with some VERY broken stdio and signal()
- code.
-
- =How can I compile the program with gcc (original from
- =Amiga UNIX 2.03)?
- =
- gcc -o foo foo.c -lsocket -lnsl
-
- If you need some Berkeley routines, my guess is you will since you
- are probably compiling strictly BSD code, try:
-
- gcc -o foo foo.c -lsocket -lnsl -lc -lucb
-
- The ucb library should always be the last library listed and -lc
- should ALWAYS preceed it. You also might try Markus' improved
- bsd emulation library available on amiga.physik.unizh.ch.
-
- -Rob
-