Building 32bit program with MSVC?

Jonathan M Davis via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu May 29 15:27:29 PDT 2014


On Thu, 29 May 2014 20:12:52 +0000
Remo via Digitalmars-d-learn <digitalmars-d-learn at puremagic.com> wrote:

> On Thursday, 29 May 2014 at 18:25:19 UTC, Jeremy DeHaan wrote:
> > I know that we can use MSVC to build a 64 bit program, but is
> > it also possible to use it to build a 32 bit program as well?
>
> Yes of course it is possible.
> It you are talking about Visual-D then it is possible there too.

If you are talking about building a 32-bit program with dmd and linking with
Microsoft's linker, it's my understanding that that will not work, because dmd
always produces OMF object files in 32-bit (which is what optlink uses),
whereas dmd produces COFF object files in 64-bit (which is what Microsoft's
linker uses). Walter went to the trouble of getting dmd to produce COFF
object files to link with Microsoft's linker when he added 64-bit Windows
support but did not want to go to the trouble of adding COFF support to
32-bit.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list