Hey guys!
I have some code which I would like to get compiled and running on Linux (Mac OS X soon!) but I'm having some problems. I'm using Visual Studio to compile my code on Windows. Previously I would just use G++ and compile that one main.cpp file. But now since the game's code has grown, I don't know what the best way for compiling on Linux would be.
I was using CodeBlocks but I figured it would be kinda difficult for maintaining two different project files for different IDEs.
I also tried CMake and SCons but I couldn't get those to work either.
If anyone has some first hand experience (Wolfire guys and other devs) or anyone has any tutorials that can put me in the direction, it would be awesome if you guys can share them with me.
BTW: I'm using SDL so I'm pretty sure that the code will compile with/without some minor changes.
Thanks,
YellowShadow
Compiling for 2 Operating Systems
Re: Compiling for 2 Operating Systems
Heyyy your first post! High five! *slaps*
Re: Compiling for 2 Operating Systems
I don't know about Linux, but for Windows and Mac OS X we just use the same source code with a number of #ifdefs to make small changes. It is tricky to keep the project files in sync, but we have a policy of trying the mac build right after committing a change to the windows build, and vice versa, which helps us fix problems before they inconvenience anyone else on the team.
-
YellowShadow
- Posts: 2
- Joined: Thu Feb 26, 2009 7:12 pm
Re: Compiling for 2 Operating Systems
If I use #ifdef would I have to #define something? Also, what would be some stuff I can use #ifdef for. I know one if for different headers.David wrote:I don't know about Linux, but for Windows and Mac OS X we just use the same source code with a number of #ifdefs to make small changes. It is tricky to keep the project files in sync, but we have a policy of trying the mac build right after committing a change to the windows build, and vice versa, which helps us fix problems before they inconvenience anyone else on the team.