Closed lea2501 closed 1 year ago
I managed to compile https://github.com/dungeons-of-moria/umoria successfully with this changes, but could not compile umoria-color.
I modified 'CMakeLists.txt' with this:
-set(CMAKE_CXX_COMPILER g++)
+set(CMAKE_CXX_COMPILER eg++)
And also file 'src/headers.h'
-#elif __APPLE__ || __linux__ || __NetBSD__ || __MORPHOS__
+#elif __APPLE__ || __linux__ || __NetBSD__ || __MORPHOS__ || __OpenBSD__
but now i'm getting:
/home/lea/src/umoria-color/src/game_save.cpp: In function 'bool loadGame(bool&)':
/home/lea/src/umoria-color/src/game_save.cpp:814:29: error: array subscript 66 is above array bounds of 'Tile_t [66][198]' [-Werror=array-bounds]
814 | if (tile >= &dg.floor[MAX_HEIGHT][0]) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/lea/src/umoria-color/src/headers.h:60,
from /home/lea/src/umoria-color/src/game_save.cpp:8:
/home/lea/src/umoria-color/src/dungeon.h:56:12: note: while referencing 'Dungeon_t::floor'
56 | Tile_t floor[MAX_HEIGHT][MAX_WIDTH];
| ^~~~~
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/umoria.dir/build.make:384: CMakeFiles/umoria.dir/src/game_save.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/umoria.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
Just to tell that it happens also in debian unstable, and arch linux boxes
[ 43%] Building CXX object CMakeFiles/umoria.dir/src/game_save.cpp.o
/root/umoria-color/src/game_save.cpp: In function 'bool loadGame(bool&)':
/root/umoria-color/src/game_save.cpp:814:29: error: array subscript 66 is above array bounds of 'Tile_t [66][198]' [-Werror=array-bounds]
814 | if (tile >= &dg.floor[MAX_HEIGHT][0]) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/umoria-color/src/headers.h:60,
from /root/umoria-color/src/game_save.cpp:8:
/root/umoria-color/src/dungeon.h:56:12: note: while referencing 'Dungeon_t::floor'
56 | Tile_t floor[MAX_HEIGHT][MAX_WIDTH];
| ^~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/umoria.dir/build.make:384: CMakeFiles/umoria.dir/src/game_save.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/umoria.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
I think you’re the one who emailed me and this is now working with the fork up-to-date with the upstream. Let me know if not!
Hi! i wanted to compile in OpenBSD 7.3 (latest stable) and i get the following error:
i added this packages already:
doas pkg_add autoconf-2.71 gcc-11.2.0p6 gmake
i also tried with this commands with same error:
cmake .. -DCMAKE_MAKE_PROGRAM=gmake -DCMAKE_CXX_COMPILER=/usr/local/bin/eg++
Thanks for mantaining this amazing game!