[OFFTOPIC...but not really] DLLs and MinGW32

new topic     » topic index » view thread      » older message » newer message

This is a multi-part message in MIME format.

------=_NextPart_000_0015_01C0E182.C62FE6C0
	charset="iso-8859-1"

How does one go about making DLLs with MinGW32?  I've tried reading docs =
online but none have been all too clear.  I've played with dlltool and =
dllwrap, but I haven't gotten one (DLL) that'll work with Eu's open_dll. =
 Could someone tell me the steps I'd need to take assuming MinGW32 (GCC =
2.95.2)?  Thanks in advance.

WARNING: C code to follow.

WITH THESE FILES:

MYDLL.C        Source File
DLLINIT.C        DLL Initialization (DllMain) ** What should I code for =
this?
LIBMYDLL.A    Library to be made so I can access my DLL from C (not have =
to use LoadLibrary())
MYDLL.DLL    Outputted DLL file that can be called from anything =
supporting DLLs

Instead of putzing with .DEFs, I put some kind of "export" command in =
front of my routines.
Ex. Want to export "TheAnswerIsThree"

_export int TheAnswerIsThree()    //pointless, I know
{
    return 3;
}

I am basing the _export off what I saw in the included API files.  What =
should I use for that?

I'd like what I could do step by step at probably a DOS command prompt.

--Mike

------=_NextPart_000_0015_01C0E182.C62FE6C0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4207.2601" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>How does one go about making DLLs with=20
MinGW32?&nbsp; I've tried reading docs online but none have been all too =

clear.&nbsp; I've played with dlltool and dllwrap, but I haven't gotten =
one=20
(DLL) that'll work with Eu's open_dll.&nbsp; Could someone tell me the =
steps I'd=20
need to take assuming MinGW32 (GCC 2.95.2)?&nbsp; Thanks in=20
advance.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>WARNING: C code to follow.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>WITH THESE FILES:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>MYDLL.C&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp; Source=20
File</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>DLLINIT.C&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp; DLL=20
Initialization (DllMain) ** What should I code for this?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>LIBMYDLL.A&nbsp;&nbsp;&nbsp; Library to =
be made so=20
I can access my DLL from C (not have to use LoadLibrary())</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>MYDLL.DLL&nbsp;&nbsp;&nbsp; Outputted =
DLL file that=20
can be called from anything supporting DLLs</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Instead of putzing with .DEFs, I put =
some kind of=20
"export" command in front of my routines.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Ex. Want to export =
"TheAnswerIsThree"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>_export int =
TheAnswerIsThree()&nbsp;&nbsp;&nbsp;=20
//pointless, I know</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>{</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; return =
3;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I am basing the _export off what I saw =
in the=20
included API files.&nbsp; What should I use for that?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I'd like what I could do step by =
step&nbsp;at=20
probably a DOS command prompt.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>

------=_NextPart_000_0015_01C0E182.C62FE6C0--

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu