From ce26eb3a430f8878f3a9a45b928ee5a2663edd9b Mon Sep 17 00:00:00 2001 From: MrWaggel Date: Mon, 27 Jun 2016 13:15:26 +0200 Subject: [PATCH 1/2] Added GCC flag -std=c++11 Required to compile the variadic templates. --- sample_mm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sample_mm/Makefile b/sample_mm/Makefile index d0ab237..9a1b3a1 100644 --- a/sample_mm/Makefile +++ b/sample_mm/Makefile @@ -26,7 +26,7 @@ OBJECTS = sample_mm.cpp ############################################## OPT_FLAGS = -O3 -funroll-loops -pipe -GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden +GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden -std=c++11 DEBUG_FLAGS = -g -ggdb3 -D_DEBUG CPP = gcc CPP_OSX = clang From bde5403495ad96f61d57b9f94b59507c38935901 Mon Sep 17 00:00:00 2001 From: MrWaggel Date: Mon, 27 Jun 2016 13:18:35 +0200 Subject: [PATCH 2/2] Removed deprecated hook NetworkIDValidated IServerGameClients does not have this function anymore, and declared hook is not being used in the sample anyways. Should compile on GCC now. --- sample_mm/sample_mm.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/sample_mm/sample_mm.cpp b/sample_mm/sample_mm.cpp index 77a2f77..c5520ff 100644 --- a/sample_mm/sample_mm.cpp +++ b/sample_mm/sample_mm.cpp @@ -28,7 +28,6 @@ SH_DECL_HOOK5(IServerGameClients, ClientConnect, SH_NOATTRIB, 0, bool, edict_t * SH_DECL_HOOK2(IGameEventManager2, FireEvent, SH_NOATTRIB, 0, bool, IGameEvent *, bool); #if SOURCE_ENGINE >= SE_ORANGEBOX -SH_DECL_HOOK2_void(IServerGameClients, NetworkIDValidated, SH_NOATTRIB, 0, const char *, const char *); SH_DECL_HOOK2_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, edict_t *, const CCommand &); #else SH_DECL_HOOK1_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, edict_t *);