Jump to content
  • Advertisement
Sign in to follow this  
jkleinecke

Cross-Platform build solution

This topic is 4133 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

I'm looking for some suggestions for using a cross-platform build solution. My project has been running on windows for a little under a year using Visual Studio. It was designed from the start to only access the platform through a generic platform interface so we could easily port it from one platform to another. I've successfully built the application on Windows using both Visual Studio and GCC compilers. What I'm looking for is a way to keep the project cross-platform after porting it. I've used codeblocks and moved the project from visual studio to codeblocks, but I run into problems when I want to develop in codeblocks and and still be able to use visual studio on windows. Does anyone have any suggestions or advice on possibly using something like automake with visual studio? In short, I'd like to be able to develop on Windows, Linux, and MacOSX without constantly needing to sync the project files between the three platforms. Thanks in advance...

Share this post


Link to post
Share on other sites
Advertisement
How about using Eclipse+CDT to develop on all those platforms ?
CDT can automatically generate makefiles as well as using makefiles you provide and integrates nicely with gcc/mingw/cygwin.
To generate makefiles you can also use qmake from trolltech. This tool is also able to generate project files for visual studio.

Share this post


Link to post
Share on other sites
Using Eclipse would work, but I'd end up running into the same problem that I hit with codeblocks. I'm pretty sure that I can get most IDE's to pull their project file list from a make file, but I just wanted some advice on how to best go about implementing it. I have a pretty complex set of visual studio project files that I would rather not have to maintain on three different build setups.

Thanks for the heads up on qmake, I'll need to look into it. Also I'd be in the market for a commercial solution as well, just as long as it doesn't cost more than a couple hundred dollars.

Share this post


Link to post
Share on other sites
If I understand you correctly, you just want a cross platform makefile solution. Well, there are a couple I know of: Scons & CMake.

However, I develop on a few cross platform applications/libraries (Ogre, OIS, etc) and I just find it easier to use seperate build files for each (Win32 Project files, Linux Autoconf files, etc). Sure, this envolves a bit more work in keep them in sync, but project files don't change often enough for me to care too much ^_^ My main battle with platform independence is the code itself ;-)

Share this post


Link to post
Share on other sites
Just a caveat: Microsoft Visual Studio is not a platform. It's a solution. You will not find a cross-solution solution.

The only way I know of to get a cross-platform solution is to use a cross-platform solution. You can use Eclipse, Ant, Jam, Autotools, whatever, but not a mixture. MSVS is not a cross-platform solution.

You can use MSVC as your editor while using one of the cross-platform solutions as your build tools.

--smw

Share this post


Link to post
Share on other sites
Quote:
Original post by Bregma
Just a caveat: Microsoft Visual Studio is not a platform. It's a solution. You will not find a cross-solution solution.

The only way I know of to get a cross-platform solution is to use a cross-platform solution. You can use Eclipse, Ant, Jam, Autotools, whatever, but not a mixture. MSVS is not a cross-platform solution.

You can use MSVC as your editor while using one of the cross-platform solutions as your build tools.

--smw


Umm, using something like Scons (what I mentioned above), you have one build script files. From that, you can generate (easily) VC7/VC7.1/VC8/Makefiles/etc project files. So you can in fact use MSVC as your editor and build system ;-) in a cross-platform mannor. But, you have to remember to make changes to the scons script and not to the project files it generates.

Share this post


Link to post
Share on other sites
Quote:
Original post by Bregma
Just a caveat: Microsoft Visual Studio is not a platform. It's a solution. You will not find a cross-solution solution.

The only way I know of to get a cross-platform solution is to use a cross-platform solution. You can use Eclipse, Ant, Jam, Autotools, whatever, but not a mixture. MSVS is not a cross-platform solution.

You can use MSVC as your editor while using one of the cross-platform solutions as your build tools.

--smw


You're right. I'm not going to be able to use Visual Studio directly anymore, and that's fine. But I'd like to integrate a custom makefile into it and have it use that to build the application. Really I'm looking for a cross-platform project file that I can use in different IDE's.

Share this post


Link to post
Share on other sites
Premake is another tool that generates VS project files, GCC Makefiles, Code::Blocks projects, and a few others, based on a Lua script that defines the project configuration. It takes a bit of effort to handle large complex projects - the game I'm working on has a thousand lines of Lua code and some non-standard patches to Premake's C code - and there are certain limitations which would be a problem if you had a desire to do something outside those limits, but we've been able to tweak it to do everything we want so far.

Share this post


Link to post
Share on other sites
Quote:
Original post by Excors
Premake is another tool that generates VS project files, GCC Makefiles, Code::Blocks projects, and a few others, based on a Lua script that defines the project configuration. It takes a bit of effort to handle large complex projects - the game I'm working on has a thousand lines of Lua code and some non-standard patches to Premake's C code - and there are certain limitations which would be a problem if you had a desire to do something outside those limits, but we've been able to tweak it to do everything we want so far.


Thanks for the heads up on Premake. It is exactly what I was looking for, aside from needing to tweak the source a bit to support pre-compiled headers.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!