Using MinGW DLL with DMD?

Dejan Lekic dejan.lekic at gmail.com
Thu Aug 9 07:00:14 PDT 2012


On Thursday, 9 August 2012 at 13:43:18 UTC, Jacob Carlborg wrote:
> Is it possible to link a DLL compiled for MinGW with DMD?

Yes, it is possible.

Long ago i have dealt with this almost on a daily basis (we used 
Borland C++ Builder on Windows in the former company I worked 
for).

The easiest method is to use DEF files to create the import 
library. If you do not have it, you can use some tool that will 
analyse the DLL, make the DEF file for you, and then you modify 
it to your needs, and then create the import library for your 
target toolchain.

This article explains everything you need to know: 
http://wyw.dcweb.cn/stdcall.htm

Regards


More information about the Digitalmars-d-learn mailing list