Using D in Games and bindings to c++ libraries

rikki cattermole via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Aug 6 06:41:51 PDT 2016


On 07/08/2016 1:08 AM, Mike Parker wrote:
> 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

What happens is dub uses DFLAGS as part of the identifier for builds and 
will propagate it to dependencies. As long as you don't miss-match the 
values of DFLAGS, you're good to go.


More information about the Digitalmars-d-learn mailing list