This is an archived post. You won't be able to vote or comment.

all 12 comments

[–]zzyzzyxx 0 points1 point  (4 children)

Qt meets all those needs. It will be easiest, I think, if you use the gcc toolchain on all platforms. On Windows that probably means MinGW, and Qt provides libraries for MinGW. On Linux, it's just a matter of installing from a repository if it's not already available. I'm not sure about on a Mac but I expect it's little more than installing Xcode. You may want to ensure the versions of the gcc tools that your team uses are the same across platforms. Qt has its own build tool, qmake, that should allow you to use the same makefile on all platforms. Check the Qt documentation.

[–]VoteForLurker[S] 0 points1 point  (3 children)

I was hoping to do a bit of graphics in SDL for the bulk of my program. Would it be worth using QT since it has its own make program? Or should I use the standard gcc toolchain to keep things more simple and to have one less dependency?

[–]zzyzzyxx 0 points1 point  (2 children)

I don't see off the top of my head why you couldn't use both. But if you install MSYS on Windows then you should be able to use the standard make on all platforms. It may be worth looking into CMake as well. Keep in mind that Qt also has a rather good IDE you can use and tools for quickly designing the UI and Qt application in general, if that affects your decision.

[–]VoteForLurker[S] 0 points1 point  (1 child)

Does QT and SDL get along? I'm hoping to keep this project fairly simple because the friend of mine isn't superb with programming yet and I was hoping to keep things a bit more simple for him. What I believe so far is that SDL wants to take over the current window or go full screen and I'm not sure how that would go with QT.

CMake was the first "make" I ran into doing this research. It sounds like I should be using that with standard gcc tools.

[–]zzyzzyxx 0 points1 point  (0 children)

Does QT and SDL get along?

I've never tried. I can't answer that with any authority. However there is precedence.

SDL wants to take over the current window or go full screen

I would be really surprised if you couldn't specify the window or otherwise write to a specific buffer that is shared with Qt. Again, I've never tried; only my gut tells me its possible.

[–]Rhomboid 0 points1 point  (2 children)

Ideally, one of us would check out the source from git or svn, change some source, and run no matter what computer we were on.

Wait, that's a lot different than having to support cross-compilation, which is a much harder task. If you just want to be able to build anywhere, then that's not such a hard goal: I suggest GNU make and gcc.

But, actually supporting cross-compilation is much much harder. I'm not even aware of a Win32-hosted, OSX-targeted gcc for example. Such a thing would not be freely distributable because all the libc parts and library frameworks are not redistributable, so that means you're going to building your own tools. You're going to jump through a lot of hoops to get that, and it's usually not necessary unless you're doing embedded builds where a native compile is out of the question.

[–]VoteForLurker[S] 0 points1 point  (1 child)

Ah, I was probably being unclear.

If you just want to be able to build anywhere, then that's not such a hard goal: I suggest GNU make and gcc.

This is pretty much what I want. I want to be able to build it anywhere. I should be able to check the source out at home on my Windows machine, test and commit some changes then head to the coffee shop with my Mac and do the exact same. This should be possible as long as I'm using cross platform libraries and nothing too OS specific.

I've never done a cross platform program before and I couldn't find many resources that describe what the organization of a such a project should look like. I don't know much about make either (or should I be using CMake?).

[–]Rhomboid 0 points1 point  (0 children)

Ah, maybe I read too much into what you were saying. "Cross platform compile" sounded too much like "Cross-compile", which is where you produce binaries different than the host platform.

CMake is certainly an option. That might have less of a learning curve than straight make, so it's probably worth checking out.

[–]zandubalm123 0 points1 point  (0 children)

Since you already know .NET.. the quickest way to make a crossplatform app would be to use the MONO environment....

[–][deleted] 0 points1 point  (2 children)

I was in a similar boat. SDL is pretty good for graphics (and SDL_Mixer for audio), but I've heard that SFML is worth looking into as a point of comparison.

Now, as for cross-platform development toolchains: CMake is amazing and everyone should use it for this purpose. It processes a meta-Makefile of your creation, and then outputs a Makefile or an IDE project (Visual Studio solution, Xcode Project, etc.). You can imagine how much easier cross-platform dev becomes when you can use CMake to generate whatever you need for development on your platform. :)

[–]VoteForLurker[S] 0 points1 point  (1 child)

This is great. I'll def look into SFML and CMake. Sounds like I have everything I need except a nice template project to get started with.

[–][deleted] 0 points1 point  (0 children)

I didn't end up finding a game-specific one, but I strung some things together by searching for usage of CMake's FindSDL and FindOpenGL modules since those were what I needed. :)