home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!spool.mu.edu!wupost!usc!zaphod.mps.ohio-state.edu!think.com!barmar
- From: barmar@think.com (Barry Margolin)
- Newsgroups: comp.windows.x
- Subject: Re: ld: -ldl: No such file or directory (help needed)
- Message-ID: <189j0qINNan9@early-bird.think.com>
- Date: 5 Sep 92 06:10:34 GMT
- References: <1992Sep4.171230.28317@athena.cs.uga.edu>
- Organization: Thinking Machines Corporation, Cambridge MA, USA
- Lines: 20
- NNTP-Posting-Host: gandalf.think.com
-
- In article <1992Sep4.171230.28317@athena.cs.uga.edu> greg@athena.cs.uga.edu (Greg Whitlock) writes:
- >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/
- >ld: -ldl: No such file or directory
- ...
- >Someone suggested that -l looks only at *.a files in /usr/lib. If so,
- >how would I solve this problem?
-
- Your GCC must be configured to use its own linker rather than /usr/bin/ld.
- The GNU linker doesn't know how to link dynamic libraries, and Sun only
- ships libdl in its dynamic form.
-
- The solution is to compile the program mit/util/dlsym.c from the X11R5
- distribution, and link this into your program in place of -ldl.
-
- Another solution is to use cc instead of gcc to link your programs.
- --
- Barry Margolin
- System Manager, Thinking Machines Corp.
-
- barmar@think.com {uunet,harvard}!think!barmar
-