# G++ error when compiling

**URL:** https://discourse.cataclysmdda.org/t/g-error-when-compiling/6309
**Category:** The Garage
**Created:** [May 29, 2014, 6:23am UTC](https://discourse.cataclysmdda.org/t/g-error-when-compiling/6309 "2014-05-29T06:23:02Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![eternalflame](https://avatars.discourse-cdn.com/v4/letter/e/d2c977/32.png) [@eternalflame](https://discourse.cataclysmdda.org/u/eternalflame)
#### Post date: [May 29, 2014, 6:23am UTC](https://discourse.cataclysmdda.org/t/g-error-when-compiling/6309/1 "2014-05-29T06:23:02Z")

</div>

My terminal output

`make
#define VERSION "0.A-3138-g2e987fb"
mkdir -p obj
g++ -DLOCALIZE -Wall -Wextra -g --std=c++11 -MMD -c src/action.cpp -o obj/action.o
g++: error: unrecognized option ‘--std=c++11’
make: *** [obj/action.o] Error 1
`  
Could anybody offer solutions to get this to compile? At least my repositories (Linux Mint 13) do not offer an update to g++.

---

<div class="post-metadata">

### Author: ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)
#### Post date: [May 29, 2014, 6:26am UTC](https://discourse.cataclysmdda.org/t/g-error-when-compiling/6309/2 "2014-05-29T06:26:39Z")

</div>

This might do what you need: [http://forums.linuxmint.com/viewtopic.php?f=47&t=138950&p=738825](http://forums.linuxmint.com/viewtopic.php?f=47&t=138950&p=738825)

---

<div class="post-metadata">

### Author: ![LazyCat-rus](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@LazyCat-rus](https://discourse.cataclysmdda.org/u/LazyCat-rus)
#### Post date: [May 29, 2014, 12:44pm UTC](https://discourse.cataclysmdda.org/t/g-error-when-compiling/6309/3 "2014-05-29T12:44:05Z")

</div>

Save this as file [http://pastebin.com/knaCtzW7](http://pastebin.com/knaCtzW7)

and run

```auto

```

Or replace string “OTHERS += --std=c++11” by “OTHERS += --std=c++0x” in your Makefile

---

<div class="post-metadata">

### Author: ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)
#### Post date: [May 29, 2014, 4:38pm UTC](https://discourse.cataclysmdda.org/t/g-error-when-compiling/6309/4 "2014-05-29T16:38:02Z")

</div>

That’s a temporary fix, but be aware it might break at some indeterminate point in the future.

---

<div class="post-metadata">

### Author: ![LazyCat-rus](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@LazyCat-rus](https://discourse.cataclysmdda.org/u/LazyCat-rus)
#### Post date: [May 29, 2014, 5:06pm UTC](https://discourse.cataclysmdda.org/t/g-error-when-compiling/6309/5 "2014-05-29T17:06:13Z")

</div>

Yes, this is a temporary fix.  
I have old compiler(gcc 4.6) too. Right now complitation is working without problems.

Right way is update system or compiler. But this is such a painfull action 😕

---

<div class="post-metadata">

### Author: ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)
#### Post date: [May 30, 2014, 1:58am UTC](https://discourse.cataclysmdda.org/t/g-error-when-compiling/6309/6 "2014-05-30T01:58:54Z")

</div>

Not putting down the solution, it works for now. the pain of upgrading is why I put off the c++11 migration for over a year, at a certain point you just have to take that step.
