Jump to content
  • Advertisement
Sign in to follow this  
MikeDee

Compiling on other OSes

This topic is 3281 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
You could try running virtual machines with alternate operating systems on them. For example, VirtualPC or VirtualBox.

Share this post


Link to post
Share on other sites
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.

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!