What's up with the windows headers?

Adam D. Ruppe via Digitalmars-d digitalmars-d at puremagic.com
Fri Jan 2 09:02:52 PST 2015


On Friday, 2 January 2015 at 16:29:56 UTC, Jack wrote:
> Somehow I have the feeling, that it will not be fixed quickly 
> as you suggests.

Eh, maybe, but I just got it working for me. Try this on for size:

download
http://arsdnet.net/dcode/dmd-windows-addon.zip

Put it in your dmd2 folder and unzip it there. It will make a new 
win32 folder and want to overwrite a gdi32.lib (the one that 
comes with dmd is from like Windows 98).


Then try compiling your project with -m64. (It is called win32 
but I just used it to do a 64 bit hello world too.)



If you don't have the 64 bit compiler installed, first install 
Visual Studio, then install dmd through the Windows installer 
exe. That's what I did. Then you can just put my zip in the 
c:\d\dmd2, extract it there, and hopefully be good to go.



The fixes I had to do to the headers were pretty minor - a 
function was declared in the wrong version block and the CONTEXT 
struct for 64 bit was missing, so I brought it over from my VS 
install.


It seems to work. I had to specify user32.lib on the compile 
command line too btw so it would bring in MessageBoxW on my hello 
world.


> I am not a compiler person and due to the project time 
> constraints can't spend the time to get the usual stuff 
> working, that works with c++ out of the box.

Yeah there's still the possibility of bugs but I really doubt it 
is that bad.


More information about the Digitalmars-d mailing list