Hi,
Since today I'm experiencing trouble with compiling the source. I first encounted a compile flag error (C++11 unsupported). I then checked the 'compile for windows' page. I followed the instructions to upgrade to TDM. However, since I'm working on a win32 platform I downloaded the 32-bit TDM version instead of the 64-bit mentioned.
Then compiled again to see the following errors
-------------- Build: windows in game (compiler: GNU GCC Compiler)---------------
mingw32-g++.exe -shared -Wl,--dll -LZ:\_Development\Tools\TDM-MinGW\lib .objs\game\src\game\chr_shared.o .objs\game\src\game\g_actor.o .objs\game\src\game\g_ai.o .objs\game\src\game\g_ai_lua.o .objs\game\src\game\g_camera.o .objs\game\src\game\g_client.o .objs\game\src\game\g_cmds.o .objs\game\src\game\g_combat.o .objs\game\src\game\g_edicts.o .objs\game\src\game\g_events.o .objs\game\src\game\g_func.o .objs\game\src\game\g_health.o .objs\game\src\game\g_inventory.o .objs\game\src\game\g_main.o .objs\game\src\game\g_match.o .objs\game\src\game\g_mission.o .objs\game\src\game\g_morale.o .objs\game\src\game\g_move.o .objs\game\src\game\g_reaction.o .objs\game\src\game\g_round.o .objs\game\src\game\g_spawn.o .objs\game\src\game\g_stats.o .objs\game\src\game\g_svcmds.o .objs\game\src\game\g_trigger.o .objs\game\src\game\g_utils.o .objs\game\src\game\g_vis.o .objs\game\src\game\inv_shared.o .objs\game\src\game\inventory.o .objs\game\src\game\q_shared.o .objs\game\src\libs\lua\lapi.o .objs\game\src\libs\lua\lauxlib.o .objs\game\src\libs\lua\lbaselib.o .objs\game\src\libs\lua\lcode.o .objs\game\src\libs\lua\ldblib.o .objs\game\src\libs\lua\ldebug.o .objs\game\src\libs\lua\ldo.o .objs\game\src\libs\lua\ldump.o .objs\game\src\libs\lua\lfunc.o .objs\game\src\libs\lua\lgc.o .objs\game\src\libs\lua\linit.o .objs\game\src\libs\lua\liolib.o .objs\game\src\libs\lua\llex.o .objs\game\src\libs\lua\lmathlib.o .objs\game\src\libs\lua\lmem.o .objs\game\src\libs\lua\loadlib.o .objs\game\src\libs\lua\lobject.o .objs\game\src\libs\lua\lopcodes.o .objs\game\src\libs\lua\loslib.o .objs\game\src\libs\lua\lparser.o .objs\game\src\libs\lua\lstate.o .objs\game\src\libs\lua\lstring.o .objs\game\src\libs\lua\lstrlib.o .objs\game\src\libs\lua\ltable.o .objs\game\src\libs\lua\ltablib.o .objs\game\src\libs\lua\ltm.o .objs\game\src\libs\lua\lua.o .objs\game\src\libs\lua\lundump.o .objs\game\src\libs\lua\lvm.o .objs\game\src\libs\lua\lzio.o .objs\game\src\libs\lua\print.o .objs\game\src\shared\aabb.o .objs\game\src\shared\infostring.o .objs\game\src\shared\mathlib.o .objs\game\src\shared\parse.o .objs\game\src\shared\shared.o .objs\game\src\shared\utf8.o -o ..\..\base\game.dll
.objs\game\src\game\g_cmds.o: In function `Z15G_ClientCommandR6Player':
Z:/_Development/Projects/Ufo/ufoai/src/game/g_cmds.cpp:442: undefined reference to `_stricmp(char const*, char const*)'
Z:/_Development/Projects/Ufo/ufoai/src/game/g_cmds.cpp:444: undefined reference to `_stricmp(char const*, char const*)'
Z:/_Development/Projects/Ufo/ufoai/src/game/g_cmds.cpp:446: undefined reference to `_stricmp(char const*, char const*)'
.objs\game\src\game\g_main.o: In function `CheckNeedPass':
Z:/_Development/Projects/Ufo/ufoai/src/game/g_main.cpp:305: undefined reference to `_stricmp(char const*, char const*)'
.objs\game\src\game\g_svcmds.o: In function `Z15G_ServerCommandv':
Z:/_Development/Projects/Ufo/ufoai/src/game/g_svcmds.cpp:354: undefined reference to `_stricmp(char const*, char const*)'
.objs\game\src\game\g_svcmds.o:Z:/_Development/Projects/Ufo/ufoai/src/game/g_svcmds.cpp:356: more undefined references to `_stricmp(char const*, char const*)' follow
.objs\game\src\shared\shared.o: In function `Z9Q_stristrPKcS0_':
Z:/_Development/Projects/Ufo/ufoai/src/shared/shared.cpp:571: undefined reference to `_strnicmp(char const*, char const*, unsigned int)'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
7 error(s), 0 warning(s) (0 minute(s), 0 second(s))
I traced it to the file src\shared\shared.h:
/* portable case sensitive compare */
#if defined(_WIN32)
# define Q_strcasecmp(a, b) _stricmp((a), (b))
# define Q_strncasecmp(s1, s2, n) _strnicmp((s1), (s2), (n))
#else
# define Q_strcasecmp(a, b) strcasecmp((a), (b))
# define Q_strncasecmp(s1, s2, n) strncasecmp((s1), (s2), (n))
#endif
I then checked the flags for a _WIN32 flag. It wasn't there. Added it but this didn't solved the issue. Now I'm a bit lost.
It is a linker error. I'm compiling with the correct library paths. And I cannot see the error in the define. _stricmp
is perfectly legal C.
Plz. help!
xray