gcc and Win32 DLL

Pete Jordan pete@horus.cix.co.uk
Thu Aug 20 01:51:00 GMT 1998

Srinivas Desirazu (1392)) <srinivas@itl.atr.co.jp> wrote:

> Can gcc build a Win32 DLL that can be used from MSVC++ 5.0.


> If so could someone post a pointer on how to do this.

I'll be posting full instructions on 
http://www.skydancer.demon.co.uk/gnu-win32/ soon, but basically you use 
the instructions for building a relocatable DLL. You need a
"--subsystem windows" on the ld lines and an appropriate "-e" parameter 
for your DLL entry point ("-e D_DllMain@12" in my case). Depending on how 
VC++ in configured, you'll need to do name mangling in your .def file - 
stuff like:


assuming you have a stdcall function called Command() with two parameters.


Pete Jordan ~ Horus Communications Ltd ~ http://www.horus.cix.co.uk/

"You know how that camel does it? He just closes one of his eyes and
 flops back his ears and plunges right through. A camel is mighty
 narrow when he closes one eye and flops back his ears. Besides, they
 use a big-eyed needle in the act."
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

More information about the Cygwin mailing list