home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / windows / x / 16211 < prev    next >
Encoding:
Internet Message Format  |  1992-09-07  |  1.4 KB

  1. Path: sparky!uunet!olivea!spool.mu.edu!wupost!usc!zaphod.mps.ohio-state.edu!think.com!barmar
  2. From: barmar@think.com (Barry Margolin)
  3. Newsgroups: comp.windows.x
  4. Subject: Re: ld: -ldl: No such file or directory (help needed)
  5. Message-ID: <189j0qINNan9@early-bird.think.com>
  6. Date: 5 Sep 92 06:10:34 GMT
  7. References: <1992Sep4.171230.28317@athena.cs.uga.edu>
  8. Organization: Thinking Machines Corporation, Cambridge MA, USA
  9. Lines: 20
  10. NNTP-Posting-Host: gandalf.think.com
  11.  
  12. In article <1992Sep4.171230.28317@athena.cs.uga.edu> greg@athena.cs.uga.edu (Greg Whitlock) writes:
  13. >gcc -fstrength-reduce -fpcc-struct-return -o xgopher xgopher.o list.o util.o misc.o net.o  gui.o options.o help.o  panel.o save.o text.o error.o cso.o index.o  KeyWSink.o -g   -L/usr/local/X/export/sparc/lib -L/usr/lib -lXaw -lXmu -lXt -lXext -lX11  -ldl -B/usr/bin/
  14. >ld: -ldl: No such file or directory
  15. ...
  16. >Someone suggested that -l looks only at *.a files in /usr/lib.  If so,
  17. >how would I solve this problem?
  18.  
  19. Your GCC must be configured to use its own linker rather than /usr/bin/ld.
  20. The GNU linker doesn't know how to link dynamic libraries, and Sun only
  21. ships libdl in its dynamic form.
  22.  
  23. The solution is to compile the program mit/util/dlsym.c from the X11R5
  24. distribution, and link this into your program in place of -ldl.
  25.  
  26. Another solution is to use cc instead of gcc to link your programs.
  27. -- 
  28. Barry Margolin
  29. System Manager, Thinking Machines Corp.
  30.  
  31. barmar@think.com          {uunet,harvard}!think!barmar
  32.