Git Product home page Git Product logo

Comments (3)

lea2501 avatar lea2501 commented on June 12, 2024

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

from umoria-color.

lea2501 avatar lea2501 commented on June 12, 2024

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

from umoria-color.

andrewtweber avatar andrewtweber commented on June 12, 2024

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!

from umoria-color.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.