Linking with C on Windows

Ellery Newcomer via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jun 5 19:02:12 PDT 2014


On Thursday, 5 June 2014 at 23:12:56 UTC, Mark Isaacson wrote:
>
> I need to eventually be able to export a
> dll that can talk with anything.

how would using dmc conflict with this goal?

dmd/dmc output omf object files, windows infrastructure is all 
coff object files. linux/mingw/etc are.. something else..

your options are

1. use dmd/dmc, and if you need to link to windows api dlls or 
others, use coffimplib (here -> ftp://ftp.dlang.org/) to convert 
the appropriate lib files.

2. if you can stomach the loss of generality, use dmd -m64, which 
does output coff object files and go your merry way with vc++. (I 
don't do this, so don't quote me on this)

3. use the mingw builds of ldc/gcc (I don't do this either and 
can't comment on how much fun you'll have getting dlls out of 
them/linking to other dlls)



More information about the Digitalmars-d-learn mailing list