Advice on cross compilation to Mac OS X

I have my game compiled in Windows with Visual Studio, in Linux with
g++. I would like to try to cross compile it for Mac OS X from either
Windows or Linux (whichever is simpler). Can any offer some advice on
the general procedure, what to look for and where to do it? Is it
relatively difficult compared to just doing it natively on a Mac? I do
have access to a friend’s Mac, but I would much prefer to work on my own
computer, out of politeness and convenience.

Thanks - Andrew

My advice would be to pick up CodeWarrior (the student edition used to
cost ~ $120). That should include a cross compiler for Windows, Mac OS
9/Carbon, and Mac OS X, that will run on both Windows and Mac OS 9/X.
There is CodeWarrior support for compiling SDL and a few SDL_* libs
already, so you won’t have too much trouble getting this to work. But
then, its not free either. Who knows, you may find that you prefer
CodeWarrior/x86 to vc++.

You might also be able to install Darwin/x86 and use that to build a
binary for Mac OS X. Problem there is I’m not sure if you’ll have all
the shared libraries you need present in Darwin. You could compile an
X11-based (slow) version rather easily in Darwin.On Thursday, October 23, 2003, at 03:01 PM, sdl-request at libsdl.org wrote:

Message: 4
Date: Wed, 22 Oct 2003 17:41:58 -0400
From: Andrew
To: sdl at libsdl.org
Subject: [SDL] advice on cross compilation to Mac OS X
Reply-To: sdl at libsdl.org

I have my game compiled in Windows with Visual Studio, in Linux with
g++. I would like to try to cross compile it for Mac OS X from either
Windows or Linux (whichever is simpler). Can any offer some advice on
the general procedure, what to look for and where to do it? Is it
relatively difficult compared to just doing it natively on a Mac? I do
have access to a friend’s Mac, but I would much prefer to work on my
own
computer, out of politeness and convenience.

Thanks - Andrew

Thanks for the advice, and it is really convenient advice since I have
a copy of CodeWarrior sitting in my drawe, Only $50 btw :stuck_out_tongue:

Thanks so much.

  • Andrew
Wait, wait, leme get this one straight... You own CodeWarrior, and you were still using VC? > ----- Original Message ----- > From: acorriga@stevens.edu (Andrew Thomas Corrigan) > To: > Sent: Thursday, October 23, 2003 7:40 PM > Subject: [SDL] Re: advice on cross compilation to Mac OS X > > > > Thanks for the advice, and it is really convenient advice since I have > > a copy of CodeWarrior sitting in my drawe, Only $50 btw :P > > > > Thanks so much. > > > > - Andrew > > > > _______________________________________________ > > SDL mailing list > > SDL at libsdl.org > > http://www.libsdl.org/mailman/listinfo/sdl > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.530 / Virus Database: 325 - Release Date: 10/22/2003 > > > >

Darrell Walisser wrote:

My advice would be to pick up CodeWarrior (the student edition used to
cost ~ $120). That should include a cross compiler for Windows, Mac OS
9/Carbon, and Mac OS X, that will run on both Windows and Mac OS 9/X.

Well I’ve managed to compile a mingw32 (gcc 3.2.3) under OSX and works
quite well, I’ve already used it a lot to compile Win32 projects and
works like a charm (both with SDL and GTK-win32). I used the libsdl.org
cross configure scripts to build it, but I had to made a few changes to
gcc sources, if someone is intrested in the binaries I can make a tar
(about 5mb) with the cross-gcc32 directory I have on my Powerbook :slight_smile: (it
includes SDL and GTK libraries and headers for w32)

Bye,
Gabry

Oh, talking about cross compile.
Is there a way to compile Mac OS X binaries from Linux?
I have a working cross compiler to windows from linux (using the mingw32
scripts someone mentioned). So I was wondering if it would be possible
to compile OS X binaries from Linux.

Gabriele Greco wrote:> Darrell Walisser wrote:

My advice would be to pick up CodeWarrior (the student edition used
to cost ~ $120). That should include a cross compiler for Windows,
Mac OS 9/Carbon, and Mac OS X, that will run on both Windows and Mac
OS 9/X.

Well I’ve managed to compile a mingw32 (gcc 3.2.3) under OSX and works
quite well, I’ve already used it a lot to compile Win32 projects and
works like a charm (both with SDL and GTK-win32). I used the
libsdl.org cross configure scripts to build it, but I had to made a
few changes to gcc sources, if someone is intrested in the binaries I
can make a tar (about 5mb) with the cross-gcc32 directory I have on my
Powerbook :slight_smile: (it includes SDL and GTK libraries and headers for w32)

Bye,
Gabry


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Darrell Walisser wrote:

There is CodeWarrior support for compiling SDL and a few SDL_* libs
already, so you won’t have too much trouble getting this to work. But
then, its not free either. Who knows, you may find that you prefer
CodeWarrior/x86 to vc++.

BTW I’m intrested in a Linux x86 hosted OSX targeted GCC, my linux box
is faster that my OSX box to compile :slight_smile:

I don’t know where to start to build it since it seems that apple has
made a lot of changes to gcc (expecially to the linker)…

Bye,
Gabry

Yep. You’ll have to at least obtain Apple’s GCC and linker source code
from Darwin (publicsource.apple.com). You’ll also need the required
shared libs/frameworks. You can compile some of these (libSystem,
IOKit), but you’ll have to copy the others from your OS X box to your
Linux box (use otool -L to list an OS X application’s shared libs).On Tuesday, October 28, 2003, at 03:01 PM, sdl-request at libsdl.org wrote:

Darrell Walisser wrote:

There is CodeWarrior support for compiling SDL and a few SDL_* libs
already, so you won’t have too much trouble getting this to work. But
then, its not free either. Who knows, you may find that you prefer
CodeWarrior/x86 to vc++.

BTW I’m intrested in a Linux x86 hosted OSX targeted GCC, my linux box
is faster that my OSX box to compile :slight_smile:

I don’t know where to start to build it since it seems that apple has
made a lot of changes to gcc (expecially to the linker)…