JACoders / OpenJK

Community effort to maintain and improve Jedi Academy (SP & MP) + Jedi Outcast (SP only) released by Raven Software
GNU General Public License v2.0
1.98k stars 607 forks source link

jospgamex86_64 failes to build OpenJO with current code #1143

Closed JoshuaPettus closed 1 year ago

JoshuaPettus commented 1 year ago

Here is the compile error in gcc.

Q3_Interface.cpp:8607:59: error: ‘m_cvars’ was not declared in this scope 8607 | std::array<char, MAX_STRING_CHARS>& buf = m_cvars[cvar_name]; | ^~~ make[2]: [codeJK2/game/CMakeFiles/jospgamex86_64.dir/build.make:510: codeJK2/game/CMakeFiles/jospgamex86_64.dir/Q3_Interface.cpp.o] Error 1 make[2]: Waiting for unfinished jobs....

Pretty sure it was the recent change that broke it as it complied fine back in March

narwhalofages commented 1 year ago

I am getting the same error message now as well, where before I was able to compile without error.

openjk-git/codeJK2/game/Q3_Interface.cpp: In function ‘int Q3_GetString(int, int, const char*, char**)’:
openjk-git/codeJK2/game/Q3_Interface.cpp:8607:59: error: ‘m_cvars’ was not declared in this scope
 8607 |                 std::array<char, MAX_STRING_CHARS>& buf = m_cvars[cvar_name];
      |                                                           ^~~~~~~
make[2]: *** [codeJK2/game/CMakeFiles/jospgamex86_64.dir/build.make:510: codeJK2/game/CMakeFiles/jospgamex86_64.dir/Q3_Interface.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:422: codeJK2/game/CMakeFiles/jospgamex86_64.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

Looks like it might be related to recent commit f3fbe80?

Linux 6.2.11 cmake 3.26.3 GCC 12.2.1 20230201

ensiform commented 1 year ago

Not fully fixed yet, still need to find the correct place to add <array> include