Using D in Games and bindings to c++ libraries

Mike Parker via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Aug 6 06:08:56 PDT 2016


On Saturday, 6 August 2016 at 11:18:11 UTC, rikki cattermole 
wrote:

> For 32bit I use a hack of a workaround to make it work 
> recursively.
>
> $ DFLAGS="-m32mscoff" ; dub build
>
> Sadly this is not full proof or much help.

For clarity, what rikki is getting at here is that DUB does not 
yet support compiling to the 32-bit COFF format. The --arch 
switch for dub has two options: x86 and x86_64. The former will 
cause it to call dmd with the -m32 switch. The only way to get 
use -m32mscoff is to specify it manually. Doing so in the dflags 
entry of your dub configuration will certainly cause errors if 
you have any dependencies in your configuration (your source will 
be compiled with -m32mscoff, while dependencies are compiled with 
-m32). I've not tried the environment variable approach that 
rikki shows here, so I have no comment on that.

There is an issue in the DUB bug tracker to for this [1].

[1] https://github.com/dlang/dub/issues/628


More information about the Digitalmars-d-learn mailing list