This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: DLL calling a DLL: undefined reference when linking.
- From: "Elfyn McBratney" <elfyn-cygwin at exposure dot org dot uk>
- To: "cygwin" <cygwin at cygwin dot com>,"Wil Hunt" <wilh at gladstone dot uoregon dot edu>
- Date: Sun, 23 Feb 2003 01:34:45 -0000
- Subject: Re: DLL calling a DLL: undefined reference when linking.
- References: <b397t8$k0m$1@main.gmane.org>
> I think I'm making marvelous progress. Unfortunately, I'm getting an
> error that doesn't make sense:
>
> $g++ -shared -mno-cygwin -o dllhello.dll dllhello.o
> other.dll -Wl,--out-implib,libdllhello.a -Wl,--enable-stdcall-fixup
> Creating library file: libdllhello.a
> dllhello.o(.text+0x164):dllhello.C: undefined reference to `InitAPI at 4'
>
> In my source code, the offending call is:
>
> extern "C" PASCAL void InitAPI( int handle );
Does dllhello.c include a header containing the prototype of InitAPI or have
a declaration of InitAPI? I think that's the gotcha.
Regards,
Elfyn McBratney
elfyn at exposure dot org dot uk
www.exposure.org.uk
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/