www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Windows: gdc-4.5 development

I was able to patch and build the latest GDC version
on Win64 MinGW. (http://mingw-w64.sourceforge.net/)

This uses the "regular" GCC version, without patches.
I used gcc-4.5.1 for testing, with binutils-2.20.51.

The normal build is multilib, so it allows both 32/64
and cross-compiling from another OS (I used Mac OS X).

It does require changing a fair number of Windows API
calls, from "DWORD" to "SIZE_T" (regular 32/64 porting):

+    version (X86)
+    alias uint SIZE_T;
+    version (X86_64)
+    alias ulong SIZE_T;

But at least it can run "Hello World" now*, on both
Win32 (-m32) and Win64 (-m64) targets. gdcwin coming.

So again gdcgnu/gdcmac/gdcwin runs on all 3 platforms.
I guess it's only ARM and LLVM left ? And of course D2.

Maybe the Ubuntu GCC and Fedora GCC counts as different
from the FSF GCC, and maybe the Apple GCC and LLVM GCC do.

But the GPLv2 GCC 4.2.1 and the GPLv3 GCC 4.5.1 should
be the two major GNU Compiler Collection generations...


$ x86_64-w64-mingw32-gdmd -m32 hello.d
$ wine hello.exe
Hello, World!
Dec 31 2010