When compiling xgopher with the -ldl option I get the following error:
[excerpt from compiling; Sun4; OS4.1.1]
athena% make
rm -f xgopher
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
*** Error code 1
make: Fatal error: Command failed for target `xgopher'
athena%
(The same happens when enclosing -ldl within -Bstatic -BDynamic)
The following file exists in /usr/lib:
-rwxr-xr-x 1 root 24576 Oct 13 1990 /usr/lib/libdl.so.1.0
Someone suggested that -l looks only at *.a files in /usr/lib. If so,
how would I solve this problem?
I would greatly appreciate any help as this has gone beyond getting xgopher
and xarchie compiled. I would really like to solve this problem so noone
else has to deal with it.
Thanks.
-Greg Whitlock
(gr...@athena.cs.uga.edu)
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.
bar...@think.com {uunet,harvard}!think!barmar