cross compiling

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

cross compiling

Post by Don »

I develop on 64 bit Linux but need to be able to cross compile to 64 bit windows. I don't have a 64 bit windows OS, although my wife has a 32 bit vista laptop I could use.

I have a friend who is willing to make the compiles for me, but I want to be able to do it myself as I create versions very frequently and have people testing for me.

What is the cheapest way out of this? I don't really want to purchase a 64 bit machine and 64 bit windows to do this. I would prefer not to touch a windows computer but wonder if there are compilers that will compile a 64 bit binary on 32 bit windows - or in wine. Does anyone do this here?

I do produce 32 bit windows exe using mingw32, but my program is half speed at 32 bits and I really want to be able to produce 64 bit windows executables.
User avatar
Jim Ablett
Posts: 2378
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: cross compiling

Post by Jim Ablett »

Hi Don,

Yes you can compile 64-bit exes on Windows 32-bit OS with Mingw-64, but of course you won't be able
to do profile-guided compiles or test the finished build on the 32-bit machine.

http://www.drangon.org/mingw/

Jim.
krazyken

Re: cross compiling

Post by krazyken »

You might be able to run 64-bit windows 7 beta in Sun's Virtual box for free. I don't know if they are still giving out free beta licenses though.
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: cross compiling

Post by Don »

Jim Ablett wrote:Hi Don,

Yes you can compile 64-bit exes on Windows 32-bit OS with Mingw-64, but of course you won't be able
to do profile-guided compiles or test the finished build on the 32-bit machine.

http://www.drangon.org/mingw/

Jim.
Thanks for the pointer. I sure hope it works under wine.
User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 7:45 pm
Location: Finland

Re: cross compiling

Post by ilari »

Don wrote:
Jim Ablett wrote:Hi Don,

Yes you can compile 64-bit exes on Windows 32-bit OS with Mingw-64, but of course you won't be able
to do profile-guided compiles or test the finished build on the 32-bit machine.

http://www.drangon.org/mingw/

Jim.
Thanks for the pointer. I sure hope it works under wine.
You don't need wine to run MinGW64, it's native for Linux: http://sourceforge.net/projects/mingw-w64

Of course you do need wine to run your 64-bit binaries in Linux, but that may not work too well. Wine64 is still in early stages of development.
CThinker
Posts: 388
Joined: Wed Mar 08, 2006 10:08 pm

Re: cross compiling

Post by CThinker »

You can use the MS Windows Platform SDK. Its free.

http://www.microsoft.com/downloads/deta ... laylang=en

You can install this on a 32-bit Windows, and you can use it to compile 64-bit Windows binaries. They even come with PGO options.

But you still need 64-bit Windows when its time to run/test your binaries.

I suggest that you first build a 32-bit Windows binary, and get that debugged and working. That way, all the Windows-related changes are done and tested on your 32-bit Windows machine.

The easiest way to build 32-bit Windows binaries is to use MS Visual Studio Express. Again, its free, and includes what is possibly the best IDE for Windows development.

Cheers...
User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 7:45 pm
Location: Finland

Re: cross compiling

Post by ilari »

CThinker wrote: The easiest way to build 32-bit Windows binaries is to use MS Visual Studio Express. Again, its free, and includes what is possibly the best IDE for Windows development.

Cheers...
I understood that Don doesn't have or use Windows on his computer, so Visual Studio isn't going to do any good. Building and testing 32-bit chess engines for Windows works just fine in Linux.
CThinker
Posts: 388
Joined: Wed Mar 08, 2006 10:08 pm

Re: cross compiling

Post by CThinker »

ilari wrote:
CThinker wrote: The easiest way to build 32-bit Windows binaries is to use MS Visual Studio Express. Again, its free, and includes what is possibly the best IDE for Windows development.

Cheers...
I understood that Don doesn't have or use Windows on his computer, so Visual Studio isn't going to do any good. Building and testing 32-bit chess engines for Windows works just fine in Linux.
You may have to re-read Don's first paragraph.
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: cross compiling

Post by Don »

ilari wrote:
CThinker wrote: The easiest way to build 32-bit Windows binaries is to use MS Visual Studio Express. Again, its free, and includes what is possibly the best IDE for Windows development.

Cheers...
I understood that Don doesn't have or use Windows on his computer, so Visual Studio isn't going to do any good. Building and testing 32-bit chess engines for Windows works just fine in Linux.
Although I have access to my wifes 32 bit windows machine, I would prefer not having to move away from what I'm comfortable with.

For now my problem is solved. I have already been using mingw32 for my chess program so I was very pleased to find that I was able to use mingw-w64 without a single change. So I am happy. And thanks for the help everyone.