From: fjh AT cs DOT mu DOT OZ DOT AU (Fergus Henderson) Subject: Re: DLL problem 30 Aug 1997 18:56:18 -0700 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <199708240910.TAA18108.cygnus.gnu-win32@murlibobo.cs.mu.OZ.AU> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Original-To: stf AT hugo DOT int-evry DOT fr (Stephane Mariel) Original-Cc: gnu-win32 AT cygnus DOT com (Cygnus GNU-win32 mailing list) In-Reply-To: <199708190947.LAA20111@hugo.int-evry.fr> from Stephane Mariel at "Aug 19, 97 11:47:23 am" X-Mailer: ELM [version 2.4ME+ PL15 (25)] Original-Sender: owner-gnu-win32 AT cygnus DOT com Stephane Mariel, you wrote: > I'm trying to port a unix network tool (at least the client) to Win95/NT , > since there is a DLL to create, I tested the example provided on > www.cygnus.com. > > It works fine, i got my foo.dll, main.exe, but moving to my real software > when I run ld for the first time I got > > c:/gnuwin32/b18/H-i386-cygwin32/i386-cygwin32/lib/libcygwin.a(libccrt0.o)(.t > ext+0x8a):libccrt0.cc: undefined reference to `GetModuleHandleA AT 4' > c:/gnuwin32/b18/H-i386-cygwin32/i386-cygwin32/lib/libcygwin.a(libcmain.o)(.t > ext+0xc):libcmain.cc: undefined reference to `GetModuleHandleA AT 4' > c:/gnuwin32/b18/H-i386-cygwin32/i386-cygwin32/lib/libcygwin.a(libcmain.o)(.t > ext+0x15):libcmain.cc: undefined reference to `GetCommandLineA AT 0' > c:/gnuwin32/b18/H-i386-cygwin32/i386-cygwin32/lib/libcygwin.a(libcmain.o)(.t > ext+0x1e):libcmain.cc: undefined reference to `WinMain AT 16' This occurs because there is no definition for `_impure_ptr' in your DLL. See for a brief explanation about `_impure_ptr'. -- Fergus Henderson | "I have always known that the pursuit WWW: | of excellence is a lethal habit" PGP: finger fjh AT 128 DOT 250 DOT 37 DOT 3 | -- the last words of T. S. Garp. - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".