home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / amiga / 2398 < prev    next >
Encoding:
Internet Message Format  |  1992-11-12  |  1.4 KB

  1. 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
  2. From: rhealey@ub.d.umn.edu (Rob Healey)
  3. Newsgroups: comp.unix.amiga
  4. Subject: Re: Problem at linking programs
  5. Message-ID: <1duitjINN803@ub.d.umn.edu>
  6. Date: 12 Nov 92 21:38:59 GMT
  7. References: <1992Nov12.125820.11876@tom.rz.uni-passau.de>
  8. Organization: University of Minnesota, Duluth
  9. Lines: 30
  10. NNTP-Posting-Host: ub.d.umn.edu
  11.  
  12. In article <1992Nov12.125820.11876@tom.rz.uni-passau.de> hessmann@unipas.fmi.uni-passau.de (Georg Hessmann) writes:
  13. =I've written a program which uses ioctl() and mmap().
  14. =If I compile it with gcc, I get the following missing
  15. =symbols while linking:
  16. =select, syslog, seteuid all from /usr/lib/libsocket.so
  17. =I've tried all link libraries, but the errors remain.
  18. =
  19.     Hmmm, you might need the -lnsl library.
  20.  
  21. =Only if I compile it with /usr/ucb/cc no errors
  22. =occure.
  23. =
  24.     YIKES!!!!! You just linked with some VERY broken stdio and signal()
  25.     code.
  26.  
  27. =How can I compile the program with gcc (original from
  28. =Amiga UNIX 2.03)?
  29. =
  30.     gcc -o foo foo.c -lsocket -lnsl
  31.  
  32.     If you need some Berkeley routines, my guess is you will since you
  33.     are probably compiling strictly BSD code, try:
  34.  
  35.     gcc -o foo foo.c -lsocket -lnsl -lc -lucb
  36.  
  37.     The ucb library should always be the last library listed and -lc
  38.     should ALWAYS preceed it. You also might try Markus' improved
  39.     bsd emulation library available on amiga.physik.unizh.ch.
  40.  
  41.         -Rob
  42.