delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/08/20/17:43:21

From: pete AT horus DOT cix DOT co DOT uk (Pete Jordan)
Subject: Re: gcc and Win32 DLL
20 Aug 1998 17:43:21 -0700 :
Message-ID: <memo.19980819022303.2213g.cygnus.gnu-win32@horus.horus.cix.co.uk>
References: <9808170209 DOT AA20700 AT as58 DOT itl DOT atr DOT co DOT jp>
Reply-To: pete AT horus DOT cix DOT co DOT uk
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

Srinivas Desirazu (1392)) <srinivas AT itl DOT atr DOT co DOT jp> wrote:

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

Yes.

> 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 AT 12" in my case). Depending on how 
VC++ in configured, you'll need to do name mangling in your .def file - 
stuff like:

EXPORTS
	Command=Command AT 8

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

HTH,

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 AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019