Jump to content
Sign in to follow this  
  • entries
  • comments
  • views

The boring part of being a Developer or: Why I failed

Sign in to follow this  


Soooo... this week I write again about the boring part of developing: Software Construction

If you've read my ramblings on "The seventh Circle of Dev Hell", know that I have my problems with the toolchains for C++, so this is basically part 2 of the Dev Hell, but more structured and no random sentences. Since I don't think C++ veterans have any interest in a text of my first experiences with different C++ tools. I aim this at the C++ newbie, like I am.
I don't have a lot of experience with the toolchains, all of this are the first experience I had with them, so don't take it too seriously when I write "tool xy sucks", I havent worked with them for more than a few hours.
"What are the best tools to use" you ask? None of them, they all suck.

The Problem with the C++ tools
They are old, mostly.
As I sink more and more time into everything around the coding, I see now why C# and Java use a separate RE. I suddenly like Ant + JUnit. It is just so easy to set up build scripts and tests for your platfom, that happens to work on others as well.
I am very disappointed by the tools available for C++, comparing to what is at Java/C# disposal, they are shabby.
This is managable for a C++ newbie if you get some help from tools, like Eclipse CDT that takes care of your make files.
Good for you, but if your project should be platform indipendent, so should be your makefiles (traditional makefiles aren't afaik). And here is where the pain starts, here is where you sink too much time, here is where you have to learn more than you think.
There are tools around, like CMake or QMake. CMake is fit for the job, but you don't. It isn't an easy tool to work with, at least for me, it really starts to get on my nerves.
That's why you shouldn't use C++ for your first big project. You spend so much time figuring out how everything else besides the coding works, how you install tool XY, how do you link correctly, how the HELL do you set up a good cross plattform build environment??

Setting up such an environment isn't hard, if you have experience how you do it. I would love somebody explaining to me his/her setup why it was done that way and not otherwise...

But alas, there was nothing I could find that satisfied me. So the short story: I gave up.

I decided to not go for platform indipendece, I first aim for Linux 64 bit environment. And if the unexpected happens and the game suddenly gains huge popularity, I can make the project cross platform with roughly the same amount of work. But then, it would be worth the time.
Sign in to follow this  


Recommended Comments

Have you tried [url="http://qt-project.org/wiki/Category:Tools::QtCreator"]QtCreator[/url]? I'm using it on Windows just fine, with the MinGW compiler, and it's supposed to be cross platform (and GCC is obviously cross platform), so I'm [i]hoping[/i] it'll ease my porting to Mac OSX and Linux when I need to cross that road later.

Or, by cross platform, do you mean compiling Windows executables on a Linux machine and vice-versa?

Share this comment

Link to comment
QTCreator is one of the few IDE's I haven't tried yet. Maybe I should.
I am currently using Code::Blocks, which I am very fond of. The only thing I don't like about it is that it seems to want all source files in ./project/source and all header files in./project/include. I haven't found out how to structure my code::blocks projects differently.

Windows executable on LInux? I haven't considered this as possible for C++, the machine code is architecture dependent, isn't it? I would like to have a toolchain for compiling the same code under windows and linux.

Share this comment

Link to comment
Yes the machine code is architecture dependant. I meant using Linux to compile a Windows executable for Windows, or using Windows to compile a Linux executable for Linux. It's doable but hard.

(It's important to understand QtCreator is an IDE meant to ease development with the Qt cross-platform GUI API, but doesn't have to be used with the Qt API)

QtCreator claims (I haven't tried it yet) to be able to compile the same code on Windows, Linux, and Macintosh, if you install QtCreator on a Linux, Windows, and Macintosh machine to do the compiling.

To compile a Windows executable, use the Windows version of QtCreator on a Windows machine, and hit compile.
To compile a Linux executable, use the Linux version, on a Linux machine, hit compile (with the same code and project files).
To compile a Macintosh executable, use the Mac version of QtCreator, on a Mac machine, and hit compile (with the same code and project files).

Supposedly, anyway.

I wasn't sure if that's what you were refering to (compiling the same code on seperate machines for seperate target machines)
Or if you were asking about cross-compiling (compiling the same code on [u]a single machine[/u] for seperate target machines. IE: Using Linux to compile Mac and Windows executables, without bothing to boot up Mac or Windows to do the compile. QtCreator doesn't handle this (it depends on the compiler, and as far as I can tell, it's not easy)

[url="http://en.wikipedia.org/wiki/Cross-platform"]Cross platform[/url] (portable code using portable tools, but requiring you to compile [u]on[/u] each target platform)
[url="http://en.wikipedia.org/wiki/Cross_compiler"]Cross compiling[/url] (portable code, using a single tool, compile different versions from [u]one[/u] platform for each target platform) [b][difficult][/b]

QtCreator should easily do the first (as long as you write portable code, QtCreator claims), and has some IDE support for the second, but that depends on the actual compiler. GCC/MinGW as a compiler [i]can[/i] do that (in theory), but it's difficult to get it set up (and certainly beyond my knowledge).

I'm not good with all these GNU tools (GCC and MinGW) to be honest, so maybe a Linux user like yourself would have an easier time. GNU seems to delberitely make the tools hard to use (and in fact have admitted it at least once before).

Share this comment

Link to comment
I originally wanted a virtual pc enviroment, each building for a target platform (I am not sure if i have to build for 32/64 bit respectively). But I postphoned that task, until i actually have something to build and release.

Since I still don't have a working toolchain, so most of the project is still in my head.

I had a first look into Qt Creator, I like what I see so far. Maybe it is the Jesus IDE for C++ at last...

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 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!