RejectedSoftware Forums

Sign up

Dub x32 COFF package generate a x64 VisualD project

I am using Dub v1.15.0 bundled with DMD v.2.86.0 on Win 7 x64.

I am only interested in COFF object format so I generate a x32 project using 'dub init abc32' and all default params: Succeeds.

Then build it using 'dub build --arch=x86_mscoff': Build succeeds. Using --verbose option I can see dub calls dmd passing -m32mscoff. I can successfully run the executable.

Then I generate a VisualD project using 'dub generate visuald': Succeeds.

But VisualD project created is x64 though. Command line shows -m64 argument passed. Is this a bug?

Also note only debug configuration of VisualD project is created - I know there are command options to build other configurations but will it not be better to automatically generate both a debug and release configuration since this is what Vsitual Studio does by default?

Re: Dub x32 COFF package generate a x64 VisualD project

On Tue, 07 May 2019 11:46:42 GMT, ShadoLight wrote:

I am using Dub v1.15.0 bundled with DMD v.2.86.0 on Win 7 x64.

I am only interested in COFF object format so I generate a x32 project using 'dub init abc32' and all default params: Succeeds.

Then build it using 'dub build --arch=x86_mscoff': Build succeeds. Using --verbose option I can see dub calls dmd passing -m32mscoff. I can successfully run the executable.

Then I generate a VisualD project using 'dub generate visuald': Succeeds.

But VisualD project created is x64 though. Command line shows -m64 argument passed. Is this a bug?

Also note only debug configuration of VisualD project is created - I know there are command options to build other configurations but will it not be better to automatically generate both a debug and release configuration since this is what Vsitual Studio does by default?

"dub generate" currently works very similar to "dub build" and takes the same arguments. The plan is to eventually let it generate configurations for all build types, configurations and architectures at once, but currently you'll have to explicitly call it with something like "dub generate visuald -b release -a x86_mscoff".

Re: Dub x32 COFF package generate a x64 VisualD project

On Wed, 15 May 2019 08:56:05 GMT, Sönke Ludwig wrote:

On Tue, 07 May 2019 11:46:42 GMT, ShadoLight wrote:

I am using Dub v1.15.0 bundled with DMD v.2.86.0 on Win 7 x64.

[snip]

"dub generate" currently works very similar to "dub build" and takes the same arguments. The plan is to eventually let it generate configurations for all build types, configurations and architectures at once, but currently you'll have to explicitly call it with something like "dub generate visuald -b release -a x86_mscoff".

Thanks for the clarification Sönke.

Indeed, if I do "dub build -b=release-debug -a=x86_mscoff" dub does indeed builds 2 versions - 1 debug and 1 release.

However, the 2 folders are named:

  • application-debug-windows-x8664-dmd2086-70..etc..A66
  • application-release-debug-windows-x86.x86mscoff-dmd2086-...etc..9F6

Note the 1 is x64, even though I specified -a=x86_mscoff.

I checked the 2 executables, and the one is x64, which is not correct - whilst the other is x86 as expected.

I opened an issue here for this.

There is also a similar (related I am sure) issue for "dub generate visuald" - I opened an issue here for that.