Error with compiling game

Hello Forum,

I have been playing this game for a while now and I have to say it’s awesome. I am surprised, that there isn’t more activity on the forums and generally on the web.

My problem is the following:

I have a different computer now, using Ubuntu 12.04 LTS.
I pulled the most recent version from github. However, when I try to compile I get an error saying this:

~/Cataclysm-DDA$ make TILES=1
#define VERSION "0.A-4708-g04b9ef8"
mkdir -p obj/tiles
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/action.cpp -o obj/tiles/action.o
g++: Fehler: unbekannte Option »–std=c++11«
make: *** [obj/tiles/action.o] Fehler 1

So, what’s the error about? (It says Error: unknown Option, btw.)
Help regarding that is greatly appreciated.

Also, a second, unrelated question:

I saw the files of the XProfessions-mod are just some .jsons. Are they really as easily moddable as it seems? So is it possible to write more content for this game only through those (seemingly) simple jsons?

Short answer: your compiler (g++) is too old. You need to install a newer version (at least 4.6).

Longer answer: the source code now uses some features of C++11, and old compilers don’t support that. See doc/COMPILER_SUPPORT.md for more informations. It contains a list of the compilers and versions that are known to work.

Are they really as easily moddable as it seems? So is it possible to write more content for this game only through those (seemingly) simple jsons?
Yes, Json is supposed to be easy. And it is supposed to allow everyone to add content without changing the source code, even without recompiling. There is a bit of documentation in doc/JSON_INFO.md and doc/JSON_FLAGS.md. Changing json files requires only a restart of the game.

Okay, thanks for the quick response.

However, when I type apt-get install g++ in my terminal it tells me that g++ is already the most recent version.
The same happens when I try to install gcc.
Just now I also installed clang.

Is there a way to manually select a different compiler, so I don’t get that error?

Also, about the jsons: If I want to contribute some things, but currently have no real idea what to actualy add, where should I begin? Are there any forum threads with ideas that noone has gotten around to do so far?

[quote=“Snaaty, post:3, topic:6882”]Okay, thanks for the quick response.

However, when I type apt-get install g++ in my terminal it tells me that g++ is already the most recent version.
The same happens when I try to install gcc.
Just now I also installed clang.

Is there a way to manually select a different compiler, so I don’t get that error?

Also, about the jsons: If I want to contribute some things, but currently have no real idea what to actualy add, where should I begin? Are there any forum threads with ideas that noone has gotten around to do so far?[/quote]

Folks have reported OK results with clang; I believe that’s what our Jenkins bot uses. (Thanks for keeping it going, Narc!)

The Needful Things thread in the Drawing Board was intended to gather ideas for folks just starting into code work, but folks swamped it without regard to the “simple” part of the spec. Feel free to root around there, but there’s no guarantee any given idea will be workable. :-/

Update: It also tells me when I ask for the version, that I have gcc 4.63, which should be sufficient?

Again, if someone could tell me a step by step instruction how to fix this, I would be eternally grateful. <
I have been searching on the internet for now, but I can’t find a solution myself.

When you ask for the version, are you doing ‘gcc --version’ or using apt to check the installed package version?
Some people have had to manually tell make what version to use, e.g.
make GCC=g+±4.6.3
I’m not sure that’s the correct filename.
You might need to open the makefile and change -std=c++11 to -std=c++0x
That was the ‘work in progress’ version of the c++11 standard.
Finally, to be sure you can continue to compile as we make changes, it’s best to install gcc 4.7 or later, or clang 3.3 or later, we might lose compatability with earlier compilers at some point, but we’re probably going to support those versions indefinitely. You can get them with a backport ppa (I don’t know which one offhand, I don’t keep up with ubuntu development) or by downloading a .deb file from somewhere, the gcc project site almost certainly has one.

This is what I use for building with clang: make -j4 CXX="clang++" TILES= LUA=1 WARNINGS= $@

I am using g++ --version to check my current version.

I tried your version of manually telling it which version to use, but then I simply get a different error, something about issues with signs being used incorrectly.

I have also tried what CIB posted, but then it gave me a fatal error after some time, claiming there was a missing SDL-data or something.