Skip to main content
GameDev.net gamedev.net
🔒 Locked

MinGW on 64 bit Windows?

Started by tomva Oct 1, 2009 at 6:11 PM 7 replies 7.5k views
Original Post
tomva
tomva
Hello all- Does anyone here have any experience with MinGW on 64 bit Windows, or any other good way to easily compile from the command line with open source tools? I haven't had any luck getting anything to work, and online searching hasn't yielded much. I could be at a dead end with 64 bit, but I wanted to see if anyone here had any success or knew a way to get MinGW working on 64 bit. Many thanks- -Thomas PS - "Cat Box Fever" is my new favorite game.
Sik_the_hedgehog
Sik_the_hedgehog
Yeah, 64-bit support for Windows wasn't available until recently. This is because not all the information needed to build 64-bit executables was available (did Microsoft ever publicly release the header format for 64-bit EXEs?).
Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.
Codeka
Codeka
I'm pretty sure it's been available for some time.

You can download the PE specification from Microsoft: here. This version from Feb 2008 includes supports for 64-bit executables. The document history says it was first created in 2006.

Here's a blog post from 2005 with various bits and pieces as well as links to MSDN on the 64-bit ABI/calling conventions/etc.
tomva
tomva

Thanks for the pointers! I am already painfully familiar with that Google search :) I have tried most of the 64-bit MinGW packages out there.

As far as I can tell, 64-bit MinGW development began in 2007 or even earlier. But it isn't anything near as full-featured as the 32-bit version. Even the current 64-bit project notes that things are only "mostly" working (mingw-w64 source forge).

For instance, there isn't any pthread support that I can find, and that's already a killer.

For now I think I'll stick to 32-bit Windows only. That means I'll have to shuffle machines a bit.

But I can look at the bright side: now I get to play with 64-bit Fedora!

-Thomas
Codeka
Codeka
Quote:
Original post by tomva
For now I think I'll stick to 32-bit Windows only. That means I'll have to shuffle machines a bit.
You can still use the 32-bit MinGW on 64-bit Windows, you just can't compile 64-bit code.
tomva
tomva
Quote:
You can still use the 32-bit MinGW on 64-bit Windows, you just can't compile 64-bit code.


I had also heard that! But when I tried to compile things I got awkward results when running. Again, I had issues with pthread support, among others. Programs would compile, but then silently fail to run. Running under gdb, I could see that there were DLL resolution errors.

So I don't think even 32bit mingw is terribly stable under 64 bit Vista, which I don't understand.
Sik_the_hedgehog
Sik_the_hedgehog
Quote:
Original post by Codeka
I'm pretty sure it's been available for some time.

You can download the PE specification from Microsoft: here. This version from Feb 2008 includes supports for 64-bit executables. The document history says it was first created in 2006.

Here's a blog post from 2005 with various bits and pieces as well as links to MSDN on the 64-bit ABI/calling conventions/etc.

Odd, I swear that the last year somebody I know tried to make a 64-bit program using MinGW and it didn't work (it built as 64-bit but using a 32-bit header). Maybe the support was there but it didn't generate useable programs yet. Meh.
Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.
tomva
tomva
Quote:
Odd, I swear that the last year somebody I know tried to make a 64-bit program using MinGW and it didn't work (it built as 64-bit but using a 32-bit header). Maybe the support was there but it didn't generate useable programs yet. Meh.


Well, it looks like Microsoft released details of the 64-bit EXE format in 2005, and work on 64-bit MinGW started seriously in 2007 or earlier.

But successful generation of 64-bit binaries is a recent MinGW accomplishment, and they still don't have anything like the feature set of the 32 bit MinGW.

Also, even 32-bit compilation can have issues on 64-bit machines.

I think MinGW will get there. But it's not something I can dive into right now myself, and I need more features (such as pthreads) than even 32-bit MinGW can support on 64-bit Windows. So I'll stick to 32-bit Windows and MinGW.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.