Sign in to follow this  
MikeDee

Compiling on other OSes

Recommended Posts

It's something I've been think about a lot, imagine the following scenario: I finished my game and, since I used SDL, I'd like to port it to Mac, Linux, and Windows. The thing is, I don't own a mac, and I'm too lazy to setup a dual boot machine with a linux distro and my current windows instalation. I could ask someone to port the game for me, but assuming I'm too paranoid and I don't want to share the code with anyone, I'd be forced to do everything myself. So how would I compile my games for the other OSes, but in windows ?

Share this post


Link to post
Share on other sites
Some compilers (gcc) for example, may support cross-compilation. This lets you compile on one architecture and target another. But honestly ... this is pointless for your example. How are you going to port your entire game without being able to *test* it on whatever other OS you're targeting?

It's exceedingly unlikely (effectively impossible) that you can just take your code, re-compile it for Mac, and then ship it. Even if it did compile without errors (which is unlikely), would you actually just assume that it works and then start trying to give it away (or sell it, or whatever)?

Share this post


Link to post
Share on other sites
Obviously I would have at least one mac user and a linux user to test the two versions.

However that cross compilation thing is interesting, I'll check out some info on it.

Share this post


Link to post
Share on other sites
Quote:
Original post by MikeDee
Obviously I would have at least one mac user and a linux user to test the two versions.

That will get you as far as "I found a bug" and no further. It is not feasible to develop for a platform without actually having direct access to that platform.

Share this post


Link to post
Share on other sites
Yeah you really just need to shell out $600 for a macmini if you want to port it to a Mac.
For Linux you can just dual boot with your existing pc.
I wrote some games in SDL and Allegro a while back and recompiled then for Mac and Linux just for kicks to see if they would run the same and right away noticed some graphics quirks with Linux and keyboard quirks on Mac so you really do need to test this stuff out.
I'd say just post your source somewhere so someone else can test it out but you already said that's out of the question not to mention it'd probably more work than it's worth.

Share this post


Link to post
Share on other sites
Thanks everyone, as of right now I'm installing ubuntu in my other laptop, and might buy a Mac in the future.
By the way, does apple sell the Mac OS X in seprate so that I can boot it with Virtual PC for example ?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this