COFF on Win32 how to try?

Rainer Schuetze via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Oct 10 09:14:55 PDT 2014



On 10.10.2014 10:37, Szymon Gatner wrote:
> I would like to try recently merged COFF support on Win32 for a hybrid
> D/C++ application.
>
> Until now I tried that (hybridizing) only with DMD from the official
> installer and in x64 mode.
>
> My question is: how to try the same in 32 bits?

You need a recent version of dmd, druntime and phobos from github: 
https://github.com/D-Programming-Language

If you have never built these yourself, Digger might be of great help: 
https://github.com/CyberShadow/Digger/releases. It will also fetch these 
from github and download tools needed for building. Digger doesn't know 
about COFF32 yet, though.

Then build druntime inside its directory:
make -f win64.mak MODEL=32mscoff "CC=\"%VCINSTALLDIR%\bin\cl.exe\"" 
target unittest

and phobos:
make -f win64.mak MODEL=32mscoff "CC=\"%VCINSTALLDIR%\bin\cl.exe\"" 
"AR=\"%VCINSTALLDIR%\bin\lib.exe\""

Add a configuration section [Environment32mscoff] to your sc.ini and add 
options matching these:

https://github.com/D-Programming-Language/dmd/blob/master/ini/windows/bin/sc.ini#L84

Building is done with option -m32mscoff instead of -m32/-m64.


More information about the Digitalmars-d-learn mailing list