Compiling on other OSes

Started by
8 comments, last by MikeDee 14 years, 9 months ago
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 ?
Advertisement
You could try running virtual machines with alternate operating systems on them. For example, VirtualPC or VirtualBox.
MMh but wouldn't that require me to have the OS I pretend to port to ?

Unity for example can port to Mac in a windows envirnoment.
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)?
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.
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.
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.

[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe
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 ?
afaik; no.

You are only allowed to run OSX on Apple hardware.
Well sadly that was kind of expected. :(
Thanks for the info ;)

This topic is closed to new replies.

Advertisement