View Full Version : Cross compiling with Gcc problem
BinarySpike
2006.09.15, 12:00 AM
Hey, I was wondering if it was possible to cross compile using Gcc from mac-to-windows...
I'm working on a program that I want to get on windows but I don't know anyone that can compile it for windows...
The only person I trust couldn't get the network libraries linked right... :-/
I checked out http://darwinports.opendarwin.org/ports/?by=cat&substr=cross
But I don't quiet understand what the arm and arv things are...
Thanks
OneSadCookie
2006.09.15, 12:10 AM
My understanding is that it *is* possible to build MinGW as a cross-compiler, but that it's not easy. It's come up before; I'd guess you can find more information by searching the boards.
BinarySpike
2006.09.15, 06:26 PM
I found this post (http://www.idevgames.com/forum/archive/index.php/t-11293.html)
And followed it to this website (http://www.zonic.co.uk/products/mingw/)
Very good info but I'm not sure if it supports Jaguar... and I'm not looking to implement it in PB or xCode at all...
I like using the command line much more, I can also write up my own scripts to compile, assemble and link to whatever (lib, bundle, stand-alone)
So MinGW will cross compile? what about compiling Gcc myself?
Jones
2006.09.15, 07:34 PM
But I don't quiet understand what the arm and arv things are...
Thanks
ARM (and probably ARV) are processor architectures that GCC can compile for. They are normally used in Palm Pilots/GameBoys etc.
The notable thing about ARM (and other) processors is that they are RISC cpu's while a PPC or i386 processor would be CISC oriented.
RISC vs. CISC (http://cse.stanford.edu/class/sophomore-college/projects-00/risc/risccisc/)
Greywhind
2006.09.16, 01:08 PM
I am also in need of cross-compiling capability from either Mac or Linux to Windows. I would prefer Mac.
I tried to set up MinGW using the links provided, but each of them failed in different ways. The script at Zonic, for example, failed to compile MinGW with an error - "no makefile found or targets specified," I think.
Anyone get this working on Tiger (I have an Intel Mac, if it makes a difference)?
If so, how?
OneSadCookie
2006.09.16, 08:46 PM
The notable thing about ARM (and other) processors is that they are RISC cpu's while a PPC or i386 processor would be CISC oriented.
Uh, PowerPC was designed as a RISC processor.
The differences are almost meaningless these days, however.
akb825
2006.09.16, 08:56 PM
Even between 2 RISC or 2 CISC processors, you can have completely different instructions, they're just different mentalities. As OSC said, they've pretty much converged. Right now, since we normally don't deal with assembly thanks to compilers, the the biggest thing you have to really worry about is byte ordering, and that's only if you're reading or writing from a file, the network, or doing something with casting to types of different sizes. If you're working with different OSs, you don't only have to worry about the different architectures, but also linking to the correct libraries. That's why, even if you have an Intel Mac, building for Windows can be... difficult. I think the easiest way would be to either install Parallels or BootCamp, install VisualStudioC++ Express, and build your app under Windows. (sorry, Binary, but that won't be the solution for you, but at least it can work for Greywhind)
Greywhind
2006.09.17, 01:59 PM
But that WOULD require me to own a copy of Windows... which is not cheap. I also don't want to buy XP and THEN have to upgrade to Vista just a few months later.
So for now, I'm going to skip compiling for Windows (unless I find a way to set up MinGW), and when I've installed Linux again (when I have some time), I'll try to set up a cross-compiler there (I hear there're some install scripts for MinGW on Linux that actually work).
PowerMacX
2006.09.17, 07:03 PM
But that WOULD require me to own a copy of Windows... which is not cheap. I also don't want to buy XP and THEN have to upgrade to Vista just a few months later.
Vista's beta is open again, get that in the meantime. ;)
BinarySpike
2006.09.22, 12:56 AM
I think the easiest way would be to either install Parallels or BootCamp, install VisualStudioC++ Express, and build your app under Windows. (sorry, Binary, but that won't be the solution for you, but at least it can work for Greywhind)
Virtual PC? :-P I just had a thought, maybe if I get linux would wine work?
I'm just gonna automatically assume it won't for now, because wine is a windows emulator, and as I was told a while back that wine only worked on intel chips.
I tried to set up MinGW using the links provided, but each of them failed in different ways. The script at Zonic, for example, failed to compile MinGW with an error - "no makefile found or targets specified," I think.
make: *** No targets specified and no makefile found. Stop.
(Mac os 10.2.8, make version 3.79)
That means you didn't ./autogen.sh or ./configure or on some cases like blender, ./config
Nowdays I've only seen ./configure compared to ./config
I'm thinking of using MinGW as my main linux compiler because there are some free wxwidgets out there that have a GUI built on.
*wants to be able to cross compile, build dynamic and shared libraries, and edit linking tables*
I totally messed my $PATH up I have fink and X11 paths in there that screw my g++ builds up so it only works on my computer.
Thanks for the help guys, those links gave me enough to work with.
Oh and btw, I'll be upgrading to a 2.6ghz intel soon, I just need to cross compile so I can finish this project and cash in.
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.