i tried to compile amxmodx and got bunch of errors and warnings
Code:
root@server1:~/amxmodx-1.8.1/amxmodx# make
mkdir -p Release
make amxmodx
make[1]: Entering directory `/root/amxmodx-1.8.1/amxmodx'
gcc -I. -I../hlsdk-2.3-p3/multiplayer -I../hlsdk-2.3-p3/multiplayer/dlls -I../hlsdk-2.3-p3/multiplayer/engine -I../hlsdk-2.3-p3/multiplayer/game_shared -I../hlsdk-2.3-p3/multiplayer/game_shared -I../metamod-1.19/metamod -Lzlib -I../hlsdk-2.3-p3/multiplayer/common -O2 -fno-strict-aliasing -funroll-loops -s -fomit-frame-pointer -pipe -DNDEBUG -fvisibility=hidden -fvisibility-inlines-hidden -march=i586 -DLINUX -DAMX_NOPROPLIST -Wall -Werror -DHAVE_STDINT_H -static-libgcc -fno-rtti -fno-exceptions -DPAWN_CELL_SIZE=32 -DJIT -DASM32 -m32 -o Release/meta_api.o -c meta_api.cpp
cc1plus: warnings being treated as errors
In file included from amxmodx.h:42,
from meta_api.cpp:40:
../hlsdk-2.3-p3/multiplayer/dlls/extdll.h:29: error: ignoring #pragma warning
../hlsdk-2.3-p3/multiplayer/dlls/extdll.h:30: error: ignoring #pragma warning
../hlsdk-2.3-p3/multiplayer/dlls/extdll.h:31: error: ignoring #pragma warning
../hlsdk-2.3-p3/multiplayer/dlls/extdll.h:32: error: ignoring #pragma warning
../hlsdk-2.3-p3/multiplayer/dlls/extdll.h:33: error: ignoring #pragma warning
In file included from ../metamod-1.19/metamod/sdk_util.h:55,
from ../metamod-1.19/metamod/dllapi.h:40,
from ../metamod-1.19/metamod/meta_api.h:40,
from amxmodx.h:43,
from meta_api.cpp:40:
../hlsdk-2.3-p3/multiplayer/dlls/util.h:249: error: 'typedef' was ignored in this declaration
In file included from ../metamod-1.19/metamod/dllapi.h:41,
from ../metamod-1.19/metamod/meta_api.h:40,
from amxmodx.h:43,
from meta_api.cpp:40:
../metamod-1.19/metamod/osdep.h: In function 'char* DLERROR()':
../metamod-1.19/metamod/osdep.h:141: error: deprecated conversion from string constant to 'char*'
In file included from ../metamod-1.19/metamod/dllapi.h:41,
from ../metamod-1.19/metamod/meta_api.h:40,
from amxmodx.h:43,
from meta_api.cpp:40:
../metamod-1.19/metamod/osdep.h: In function 'int THREAD_CREATE(THREAD_T*, void (*)())':
../metamod-1.19/metamod/osdep.h:297: error: deprecated conversion from string constant to 'char*'
../metamod-1.19/metamod/osdep.h:302: error: deprecated conversion from string constant to 'char*'
../metamod-1.19/metamod/osdep.h: In function 'int MUTEX_INIT(MUTEX_T*)':
../metamod-1.19/metamod/osdep.h:329: error: deprecated conversion from string constant to 'char*'
../metamod-1.19/metamod/osdep.h: In function 'int MUTEX_LOCK(MUTEX_T*)':
../metamod-1.19/metamod/osdep.h:336: error: deprecated conversion from string constant to 'char*'
../metamod-1.19/metamod/osdep.h: In function 'int MUTEX_UNLOCK(MUTEX_T*)':
../metamod-1.19/metamod/osdep.h:343: error: deprecated conversion from string constant to 'char*'
../metamod-1.19/metamod/osdep.h: In function 'int COND_INIT(COND_T*)':
../metamod-1.19/metamod/osdep.h:374: error: deprecated conversion from string constant to 'char*'
../metamod-1.19/metamod/osdep.h: In function 'int COND_WAIT(COND_T*, MUTEX_T*)':
../metamod-1.19/metamod/osdep.h:381: error: deprecated conversion from string constant to 'char*'
../metamod-1.19/metamod/osdep.h: In function 'int COND_SIGNAL(COND_T*)':
../metamod-1.19/metamod/osdep.h:388: error: deprecated conversion from string constant to 'char*'
In file included from amxmodx.h:61,
from meta_api.cpp:40:
CMisc.h: In constructor 'CCVar::CCVar(const char*, const char*, int, float)':
CMisc.h:53: error: deprecated conversion from string constant to 'char*'
meta_api.cpp: At global scope:
meta_api.cpp:67: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:67: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:67: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:67: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:67: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:67: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:67: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:140: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:140: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:141: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:141: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:142: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:142: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:143: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:143: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:144: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:144: error: deprecated conversion from string constant to 'char*'
meta_api.cpp: In function 'void BuildPluginFileList(const char*, CStack<String*>&)':
meta_api.cpp:202: error: deprecated conversion from string constant to 'char*'
meta_api.cpp: In function 'int C_PrecacheSound(char*)':
meta_api.cpp:285: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:286: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:287: error: deprecated conversion from string constant to 'char*'
meta_api.cpp: In function 'int C_Spawn(edict_t*)':
meta_api.cpp:366: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:367: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:461: error: deprecated conversion from string constant to 'char*'
meta_api.cpp: In function 'void C_ClientUserInfoChanged_Post(edict_t*, char*)':
meta_api.cpp:851: error: deprecated conversion from string constant to 'char*'
meta_api.cpp: In function 'int Meta_Attach(PLUG_LOADTIME, META_FUNCTIONS*, meta_globals_t*, gamedll_funcs_t*)':
meta_api.cpp:1440: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:1460: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:1462: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:1466: error: deprecated conversion from string constant to 'char*'
make[1]: *** [Release/meta_api.o] Error 1
make[1]: Leaving directory `/root/amxmodx-1.8.1/amxmodx'
make: *** [all] Error 2
so i searched the forums for answers and found this Arkshines post:
Quote:
Try to add -Wno-write-strings or/and -Wno-deprecated. If not enough, try removing simply -Werror so the warning won't be count as error.
|
and the -Wno-write-strings part removed some errors, but thats it, removing -Werror makes it worse and -Wno-deprecated wont help
Code:
root@server1:~/amxmodx-1.8.1/amxmodx# make
mkdir -p Release
make amxmodx
make[1]: Entering directory `/root/amxmodx-1.8.1/amxmodx'
gcc -I. -I../hlsdk-2.3-p3/multiplayer -I../hlsdk-2.3-p3/multiplayer/dlls -I../hlsdk-2.3-p3/multiplayer/engine -I../hlsdk-2.3-p3/multiplayer/game_shared -I../hlsdk-2.3-p3/multiplayer/game_shared -I../metamod-1.19/metamod -Lzlib -I../hlsdk-2.3-p3/multiplayer/common -O2 -fno-strict-aliasing -funroll-loops -s -fomit-frame-pointer -pipe -DNDEBUG -fvisibility=hidden -fvisibility-inlines-hidden -march=i586 -DLINUX -DAMX_NOPROPLIST -Wall -Werror -DHAVE_STDINT_H -static-libgcc -fno-rtti -fno-exceptions -Wno-write-strings -DPAWN_CELL_SIZE=32 -DJIT -DASM32 -m32 -o Release/meta_api.o -c meta_api.cpp
cc1plus: warnings being treated as errors
In file included from amxmodx.h:42,
from meta_api.cpp:40:
../hlsdk-2.3-p3/multiplayer/dlls/extdll.h:29: error: ignoring #pragma warning
../hlsdk-2.3-p3/multiplayer/dlls/extdll.h:30: error: ignoring #pragma warning
../hlsdk-2.3-p3/multiplayer/dlls/extdll.h:31: error: ignoring #pragma warning
../hlsdk-2.3-p3/multiplayer/dlls/extdll.h:32: error: ignoring #pragma warning
../hlsdk-2.3-p3/multiplayer/dlls/extdll.h:33: error: ignoring #pragma warning
In file included from ../metamod-1.19/metamod/sdk_util.h:55,
from ../metamod-1.19/metamod/dllapi.h:40,
from ../metamod-1.19/metamod/meta_api.h:40,
from amxmodx.h:43,
from meta_api.cpp:40:
../hlsdk-2.3-p3/multiplayer/dlls/util.h:249: error: 'typedef' was ignored in this declaration
make[1]: *** [Release/meta_api.o] Error 1
make[1]: Leaving directory `/root/amxmodx-1.8.1/amxmodx'
make: *** [all] Error 2
any ideas what could be wrong?