SUMMARY: Linking problems on SunOS 4.1.3_U1

Ernie Bisson, MIT Bates Linear Accelerator (BISSON@AESIR.MIT.EDU)
Thu, 20 Mar 1997 11:49:31 -0500 (EST)

Original Question
================================================================================
> Building the simpilist little C program results in the following errors
> from "ld".
>
> ld: Undefined symbol
> _dlopen
> _dlclose
> _dlsym
>
> It's been quite some time since I've built anything on this particular
> machine, but I'm sure I never used to have this problem.
>
> I'm using "cc" on SunOS 4.1.3_U1.
================================================================================

The majority of answers said to add the -ldl option when compiling/linking.
I actually had figured this out on my own, but was totally lost why I suddenly
needed to do this.

Glenn Satchell made it clear why. It was because I recently had rebuilt the
shared libraries to use DNS instead of NIS for hostname resolution. He pointed
me back to the FAQ for the fix to the linking problem. It is documented in
Section 3.8 of the FAQ.

I actually had looked thru the FAQ before posting my question, but somehow
missed the solution.

Thanks to all for your help.

Ernie

--------------------------------------------------------------------------------
Ernie Bisson
M.I.T. Bates Linear Accelerator
P.O. Box 846
Middleton, Massachusetts 01949-2846
(508) 774-2370 or (617) 253-9218

E-Mail : bisson@bates.mit.edu
--------------------------------------------------------------------------------