# Cataclysm compilation errors under linux (NOT DDA) -\> SOLVED

**URL:** <https://discourse.cataclysmdda.org/t/cataclysm-compilation-errors-under-linux-not-dda-solved/13219>\
**Category:** The Garage\
**Created:** [December 30, 2016, 3:00pm UTC](https://discourse.cataclysmdda.org/t/cataclysm-compilation-errors-under-linux-not-dda-solved/13219 "2016-12-30T15:00:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![unitready](https://avatars.discourse-cdn.com/v4/letter/u/f475e1/32.png) [@unitready](https://discourse.cataclysmdda.org/u/unitready)\
**Post date:** [December 30, 2016, 3:00pm UTC](https://discourse.cataclysmdda.org/t/cataclysm-compilation-errors-under-linux-not-dda-solved/13219/1 "2016-12-30T15:00:04Z")

</div>

Hi,

My question is not about DDA but about original Cataclysm. I`ve downloaded it from github and trying to compile it under linux. I`ve encountered several problems in code but managed to fix them. But then I started to see following issue. I didn`t found the solution to fix this yet and if someone will point to what direction should I look to fix this I will be grateful.

> g++ -O3 -c game.cpp -o obj/game.o In file included from /usr/include/c++/6/bits/char\_traits.h:39:0, from /usr/include/c++/6/string:40, from mtype.h:6, from game.h:4, from game.cpp:1: /usr/include/c++/6/bits/stl\_algobase.h: In instantiation of ‘static \_OI std::\_\_copy\_move::\_\_copy\_m(\_II, \_II, \_OI) [with \_II = game\_message\*; \_OI = game\_message\*]’: /usr/include/c++/6/bits/stl\_algobase.h:386:44: required from ‘\_OI std::\_\_copy\_move\_a(\_II, \_II, \_OI) [with bool \_IsMove = true; \_II = game\_message\*; \_OI = game\_message\*]’ /usr/include/c++/6/bits/stl\_algobase.h:422:45: required from ‘\_OI std::\_\_copy\_move\_a2(\_II, \_II, \_OI) [with bool \_IsMove = true; \_II = \_\_gnu\_cxx::\_\_normal\_iterator\<game\_message\*, std::vector \>; \_OI = \_\_gnu\_cxx::\_\_normal\_iterator\<game\_message\*, std::vector \>]’ /usr/include/c++/6/bits/stl\_algobase.h:487:39: required from ‘\_OI std::move(\_II, \_II, \_OI) [with \_II = \_\_gnu\_cxx::\_\_normal\_iterator\<game\_message\*, std::vector \>; \_OI = \_\_gnu\_cxx::\_\_normal\_iterator\<game\_message\*, std::vector \>]’ /usr/include/c++/6/bits/vector.tcc:145:2: required from ‘std::vector\<\_Tp, \_Alloc\>::iterator std::vector\<\_Tp, \_Alloc\>::\_M\_erase(std::vector\<\_Tp, \_Alloc\>::iterator) [with \_Tp = game\_message; \_Alloc = std::allocator; std::vector\<\_Tp, \_Alloc\>::iterator = \_\_gnu\_cxx::\_\_normal\_iterator\<game\_message\*, std::vector \>; typename std::\_Vector\_base\<\_Tp, \_Alloc\>::pointer = game\_message\*]’ /usr/include/c++/6/bits/stl\_vector.h:1148:24: required from ‘std::vector\<\_Tp, \_Alloc\>::iterator std::vector\<\_Tp, \_Alloc\>::erase(std::vector\<\_Tp, \_Alloc\>::const\_iterator) [with \_Tp = game\_message; \_Alloc = std::allocator; std::vector\<\_Tp, \_Alloc\>::iterator = \_\_gnu\_cxx::\_\_normal\_iterator\<game\_message\*, std::vector \>; typename std::\_Vector\_base\<\_Tp, \_Alloc\>::pointer = game\_message\*; std::vector\<\_Tp, \_Alloc\>::const\_iterator = \_\_gnu\_cxx::\_\_normal\_iterator\<const game\_message\*, std::vector \>; typename \_\_gnu\_cxx::\_\_alloc\_traits::\_Tp\_alloc\_type\>::const\_pointer = const game\_message\*]’ game.cpp:1886:34: required from here /usr/include/c++/6/bits/stl\_algobase.h:343:18: error: use of deleted function ‘game\_message& game\_message::operator=(game\_message&&)’ \*\_\_result = std::move(\*\_\_first); ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ In file included from game.cpp:1:0: game.h:56:8: note: ‘game\_message& game\_message::operator=(game\_message&&)’ is implicitly deleted because the default definition would be ill-formed: struct game\_message ^~~~~~~~~~~~game.h:56:8: error: invalid initialization of non-const reference of type ‘calendar&’ from an rvalue of type ‘calendar’ In file included from game.h:19:0, from game.cpp:1: calendar.h:55:13: note: initializing argument 1 of ‘calendar& calendar::operator=(calendar&)’ calendar& operator = (calendar &rhs); ^~~~~~~~ Makefile:43: recipe for target 'obj/game.o' failed \make: \*\*\* [obj/game.o] Error 1

Thanks in advance!

---

<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:** [December 30, 2016, 9:08pm UTC](https://discourse.cataclysmdda.org/t/cataclysm-compilation-errors-under-linux-not-dda-solved/13219/2 "2016-12-30T21:08:34Z")

</div>

Newer g++ versions default to newer c++ standards, try passing a -std=c++98 flag. Double check the string, that’s from memory.

---

<div class="post-metadata">

**Author:** ![unitready](https://avatars.discourse-cdn.com/v4/letter/u/f475e1/32.png) [@unitready](https://discourse.cataclysmdda.org/u/unitready)\
**Post date:** [December 31, 2016, 12:40pm UTC](https://discourse.cataclysmdda.org/t/cataclysm-compilation-errors-under-linux-not-dda-solved/13219/3 "2016-12-31T12:40:11Z")

</div>

Hi,

Thanks a lot Kevin Granade, I was able to compile game.cpp with c++98.  
But unfortunately I`ve encountered another problem with map.cpp. I hope it will be the last problem to compile this already.

> g++ -std=c++98 -O3 -c map.cpp -o obj/map.o map.cpp: In member function ‘bool map::sees(int, int, int, int, int, int&)’: [glow=red,2,300]map.cpp:1923:15: error: ‘x’ was not declared in this scope[/glow] if (!trans(x, y)) ^ [glow=red,2,300]map.cpp:1935:1: error: expected primary-expression before ‘bool’[/glow] bool map::sees(int Fx, int Fy, int Tx, int Ty, int range, int &tc) ^~~~ [glow=red,2,300]map.cpp:2432:1: error: expected ‘}’ at end of input[/glow] } ^ [glow=red,2,300]map.cpp:2432:1: error: expected ‘}’ at end of input[/glow] Makefile:43: recipe for target 'obj/map.o' failed make: \*\*\* [obj/map.o] Error 1

Also, after I will successfully compile the game I will write some kind of a little how to if someone else would want to see the original Cataclysm game.

Thanks!

---

<div class="post-metadata">

**Author:** ![unitready](https://avatars.discourse-cdn.com/v4/letter/u/f475e1/32.png) [@unitready](https://discourse.cataclysmdda.org/u/unitready)\
**Post date:** [December 31, 2016, 7:29pm UTC](https://discourse.cataclysmdda.org/t/cataclysm-compilation-errors-under-linux-not-dda-solved/13219/4 "2016-12-31T19:29:31Z")

</div>

If you want to try original Cataclysm game you will need to do the following in order to make it compiled.

1. Download or clone repo from GitHub [https://github.com/Whales/Cataclysm](https://github.com/Whales/Cataclysm)
2. Make sure that you have installed  
apt-get install build-essential module-assistant libncurses5-dev
3. In iuse.cpp comment out 314 line.
4. In item.cpp at 282 line add y to health.
5. In map.cpp comment lines from 1916 through 1930 (everything under //WIP: faster map::sees)
6. In Makefile add  
43 $(CXX) [glow=red,2,300]-std=c++98[/glow] $(CFLAGS) -c $\< -o $@  
to use old version of c++ to compile game.cpp
7. Run make, wait until it compiles and links then.
8. In source code folder will be cataclysm file. Just run it ./cataclysm

Hope this will help someone.

---

<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:** [January 7, 2018, 7:55pm UTC](https://discourse.cataclysmdda.org/t/cataclysm-compilation-errors-under-linux-not-dda-solved/13219/5 "2018-01-07T19:55:59Z")

</div>


