This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: dlopen, dlclose, problems
- To: Edward_C_Morgan <ecmorgan at lucent dot com>
- Subject: Re: dlopen, dlclose, problems
- From: Martin Kahlert <martin dot kahlert at mchp dot siemens dot de>
- Date: Mon, 25 Jan 1999 09:02:35 +0100
- Cc: egcs-bugs at cygnus dot com
- References: <36A8BCB5.608427F8@lucent.com>
- Reply-To: martin dot kahlert at mchp dot siemens dot de
Quoting Edward_C_Morgan (ecmorgan@lucent.com):
> I'm on a solaris and I'm compiling a statically linked program and I'm
> getting the following errors when I'm linking it:
> $ g++ -static -O3 jnk.o -o jnk
> /usr/lib/libc.a(nss_deffinder.o): In function `SO_per_src_lookup':
> nss_deffinder.o(.text+0x74): undefined reference to `dlopen'
> nss_deffinder.o(.text+0xa4): undefined reference to `dlsym'
> nss_deffinder.o(.text+0xb8): undefined reference to `dlclose'
> /usr/lib/libc.a(nss_deffinder.o): In function `SO_per_src_delete':
> nss_deffinder.o(.text+0xf4): undefined reference to `dlclose'
> collect2: ld returned 1 exit status
Try adding '-ldl' to the link line:
$ g++ -static -O3 jnk.o -o jnk -ldl
Hope, that helps,
Martin.
--
Your mouse has moved. Windows must be restarted for the change
to take effect. Reboot now?