From: khan AT xraylith DOT wisc DOT edu (Mumit Khan) Subject: Re: Q: Calling LoadLibrary from cygwin dll generates error 27 Oct 1998 09:32:46 -0800 Message-ID: References: <363516ED DOT 493E7E2 AT cityweb DOT de> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII To: Corinna Vinschen Cc: cygwin32-developers AT cygnus DOT com On Tue, 27 Oct 1998, Corinna Vinschen wrote: > -------- > EXPORTS > dll_entry AT 12 > [... plus 10 symbol definitions without '@' ...] I don't think you should be exporting your DLL entry point, but that shouldn't matter in this case I don't think. Could you try out dllhelpers-0.2.4 and see if that helps? It provides a portable DLL init function (incorporated in upcoming b20) which takes care of attaching to the DLL correctly. If you've marked your exports in the code, $ dllwrap --add-stdcall-alias -o foo.1.dll [objs ...] [libs ...] or, if you already have DEF file, $ dllwrap --def foo.1.def -o foo.1.dll [objs ...] [libs ...] --add-stdcall-alias adds the aliases for @ symbols: EXPORTS foo AT 0 @ 1; foo = foo AT 0 @ 2; Use the default entry point and DLL main instead of supplying your own. See the examples. http://www.xraylith.wisc.edu/~khan/software/gnu-win32/ for download info. The ftp site also has some examples of LoadLibrary -- see the loadlib-example*.tar.gz files. Regards, Mumit