ansjob / cpp-rpg-game

A small lab we made for the course cprog12 to create a C++ role playing game using classic text-commands. The engine is there and very extensible.
7 stars 1 forks source link

Error Compiling #1

Closed ghost closed 1 week ago

ghost commented 6 years ago

In file included from /Dev/cpp-rpg-game-master/src/consumable_item.cpp:7:0: /Dev/cpp-rpg-game-master/src/consumable_item.h:28:178: error: could not convert ‘rpg::consumable_item::<lambda()>{}’ from ‘rpg::consumable_item::<lambda()>’ to ‘std::function<bool(std::basic_ostream&, rpg::actor)>’ consumable_item(string n = "Dummy consumable_item", string desc = "Dummy consumable_item description", int vol = 0, int val = 0, function<bool (ostream &os, actor)> fun = [] {}) : ^ CMakeFiles/game.dir/build.make:278: recipe for target 'CMakeFiles/game.dir/src/consumable_item.cpp.o' failed make[2]: [CMakeFiles/game.dir/src/consumable_item.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/game.dir/all' failed make[1]: [CMakeFiles/game.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

xahon commented 6 years ago

@codemasterPL I very much doubt that the author will fix this after 5 years :)

ansjob commented 1 week ago

I just cloned the repo on Ubuntu on WSL, and ran the game like this:

sudo snap install cmake
sudo apt install libboost-all-dev
cmake .
make -j 8
./game

Closing out as won't fix