Cross Platform Development

Soldato
Joined
7 Apr 2004
Posts
4,212
Hi,

Im shortly gonna be doing some development work on Linux with GCC, and want to cross-compile to give me binarys for both Windows and OSX, firstly is this possible? Secondly could anyone explain how its done, or point me to a guide.

Im basically gonna have all my program logic in a C++ library, then im using Qt for cross-platform GUI support. So baring this in mind can i compile everything under one OS? or will i have to compile under each OS?

Thanks a lot,

Jack
 

Una

Una

Associate
Joined
26 Nov 2004
Posts
2,471
Location
Reading / Lake District
You can cross compile on linux for windows but it really is a pain to get working. Not to mention it really is on a per app specific basis you need to set up linking with the correct objects/shared objects/dll's ..

Using MinGW there is a guide here you might have some luck with.
http://gentoo-wiki.com/HOWTO_MinGW

You could try Cygwin on windows to target linux as well.
http://metamod-p.sourceforge.net/cross-compiling.on.windows.for.linux.html

For windows you got PE file format, Linux ELF, and OSX Darwin/Mach-O .. It really will be a lot of hastle to get working for all three platforms. Your better off just having vmware setup and compiling in each OS your targetting.
 
Soldato
OP
Joined
7 Apr 2004
Posts
4,212
Ok thanks a lot guys, I already have a set of virutal machines set up for testing purposes, so it sounds like i might be better off just sharing the source and compiling independatly under each OS then doing testing. Probably less hassel in the long run.
 
Associate
Joined
17 Feb 2006
Posts
898
Location
Fleet
Yep that is the easier solution. Sometimes its not possible / or the target is so slow its better to compile on another machine and copy the binaries :)
 
Back
Top Bottom