Raised This Month: $ Target: $400
 0% 

CS:GO Linux Compile


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PMA.Predator
Member
Join Date: Jan 2012
Old 07-15-2012 , 10:40   CS:GO Linux Compile
Reply With Quote #1

Hey all,

I've just been asked to get PMA working on CS:GO and after getting the flags and such sorted I've got some strange messages from the compiler about 'class ConVar' not having a member named 'GetString'

Here's my makefile:

Code:
#####################################################################
# Plugin Information
#####################################################################

PLUGIN_NAME = match_admin


#####################################################################
# Plugin Files and Directories
#####################################################################

# Plugin directory 
HL2SDK = /home/pred/PMAGO

# Where to place the plugin once compiled 
PLUGIN_DIR = Release/Linux

# Location of SRCDS Binarys
SRCDS = /home/pred/gobin

HL2PUB = $(HL2SDK)/public
HL2SDK_TIER0 = $(HL2SDK)/public/tier0
HL2SDK_TIER1 = $(HL2SDK)/tier1

CHOST="i586-pc-linux-gnu"
CFLAGS = "-march=pentium-mmx -O2 -pipe -fomit-frame-pointer"
CXXFLAGS = "${CFLAGS}"

OBJECTS = serverplugin_main.cpp \
pmafiles/MRecipientFilter.cpp \
pmafiles/Commands.cpp \
pmafiles/Menus.cpp \
pmafiles/Offsets.cpp \
pmafiles/Utils.cpp \
pmafiles/Storage.cpp \
pmafiles/MatchUtils.cpp \
pmafiles/FairPlay.cpp \
pmafiles/Autowar.cpp 


#####################################################################
# Plugin Flags
#####################################################################

ARCH_CFLAGS = -mtune=i686 -march=pentium -mmmx
BASE_CFLAGS = -fpermissive -D_LINUX -DNDEBUG -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -fPIC -Wno-deprecated -fno-rtti -msse -DCOMPILER_GCC
OPT_FLAGS = -O3 -fno-rtti -funroll-loops -s -pipe
DEBUG_FLAGS = -g -ggdb3 -D_DEBUG
CPP = /usr/bin/i386-redhat-linux-gcc
#CPP = /opt/crosstool/gcc-3.4.1-glibc-2.3.2/i686-unknown-linux-gnu/bin/i686-unknown-linux-gnu-gcc

ARCH_BIN = .so


#####################################################################
# Setting up plugin name
#####################################################################ff

BINARY = $(PLUGIN_NAME)$(ARCH_BIN)

#####################################################################
# Plugin Lib Includes
#####################################################################

LINK = -lm -ldl tier1_i486.a tier2_i486.a libtier0.so interfaces_i486.so libvstdlib.so mathlib_i486.a -static-libgcc

#####################################################################
# .h Files Folders Includes
#####################################################################

INCLUDE = -I. -I$(HL2PUB) -I$(HL2PUB)/dlls -I$(HL2PUB)/engine -I$(HL2PUB)/tier0 -I$(HL2PUB)/tier1 \
-I$(HL2PUB)/vstdlib -I$(HL2SDK)/tier1 -I$(HL2SDK)/game/shared -I$(HL2SDK)/game/server


#####################################################################
# Compile Section
#####################################################################

CFLAGS = $(OPT_FLAGS) $(USER_CFLAGS) $(BASE_CFLAGS) $(ARCH_CFLAGS)

OBJ_LINUX := $(OBJECTS:%.cpp=$(PLUGIN_DIR)/%.o)

$(PLUGIN_DIR)/%.o: %.cpp
    $(CPP) $(INCLUDE) $(CFLAGS) -o $@ -c $<

all:
    mkdir -p $(PLUGIN_DIR)
    ln -sf $(SRCDS)/libvstdlib.so libvstdlib.so
    ln -sf $(SRCDS)/libtier0.so libtier0.so
    ln -sf $(HL2SDK_TIER0)/memoverride.cpp memoverride.cpp
    ln -sf $(HL2SDK)/lib/linux/mathlib_i486.a mathlib_i486.a
    ln -sf $(HL2SDK)/lib/linux/tier1_i486.a tier1_i486.a
    ln -sf $(HL2SDK)/lib/linux/tier2_i486.a tier2_i486.a
    ln -sf $(HL2SDK)/lib/linux/interfaces_i486.a interfaces_i486.a

    $(MAKE) plugin

plugin: $(OBJ_LINUX)
    $(CPP) $(INCLUDE) $(CFLAGS) $(OBJ_LINUX) $(LINK) -shared -ldl -lm -o$(PLUGIN_DIR)/$(BINARY)

debug:
    $(MAKE) all DEBUG=true

default: all

clean:
    rm -rf $(PLUGIN_DIR)/*
and here's the compile errors:

Code:
serverplugin_main.cpp: In function 'void CVarChanged(IConVar*, const char*, floa
t)':
serverplugin_main.cpp:150: error: 'class ConVar' has no member named 'GetString'
serverplugin_main.cpp: In member function 'virtual bool CMatchAdmin::Load(void*
(*)(const char*, int*), void* (*)(const char*, int*))':
serverplugin_main.cpp:226: error: 'class ConVar' has no member named 'GetString'
serverplugin_main.cpp:227: error: 'class ConVar' has no member named 'GetString'
serverplugin_main.cpp:228: error: 'class ConVar' has no member named 'GetString'
serverplugin_main.cpp:229: error: 'class ConVar' has no member named 'GetString'
serverplugin_main.cpp:230: error: 'class ConVar' has no member named 'GetString'
serverplugin_main.cpp:232: error: 'class ConVar' has no member named 'GetString'
serverplugin_main.cpp:233: error: 'class ConVar' has no member named 'GetString'
serverplugin_main.cpp:234: error: 'class ConVar' has no member named 'GetString'
serverplugin_main.cpp:235: error: 'class ConVar' has no member named 'GetString'
serverplugin_main.cpp:236: error: 'class ConVar' has no member named 'GetString'
serverplugin_main.cpp:237: error: 'class ConVar' has no member named 'GetString'
serverplugin_main.cpp:238: error: 'class ConVar' has no member named 'GetString'
serverplugin_main.cpp:239: error: 'class ConVar' has no member named 'GetString'
serverplugin_main.cpp:241: error: 'class ConVar' has no member named 'GetString'
serverplugin_main.cpp:242: error: 'class ConVar' has no member named 'GetString'
serverplugin_main.cpp:244: error: 'class ConVar' has no member named 'GetString'
serverplugin_main.cpp:249: error: 'class ConVar' has no member named 'GetString'
serverplugin_main.cpp:250: error: 'class ConVar' has no member named 'GetString'
serverplugin_main.cpp: In member function 'virtual void CMatchAdmin::LevelInit(c
onst char*)':
serverplugin_main.cpp:355: error: 'class ConVar' has no member named 'GetString'
serverplugin_main.cpp:356: error: 'class ConVar' has no member named 'GetString'
serverplugin_main.cpp: In member function 'virtual void CMatchAdmin::ClientDisco
nnect(edict_t*)':
serverplugin_main.cpp:490: warning: deprecated conversion from string constant t
o 'char*'
serverplugin_main.cpp: In member function 'virtual PLUGIN_RESULT CMatchAdmin::Cl
ientConnect(bool*, edict_t*, const char*, const char*, char*, int)':
serverplugin_main.cpp:548: warning: deprecated conversion from string constant t
o 'char*'
serverplugin_main.cpp:573: warning: deprecated conversion from string constant t
o 'char*'
serverplugin_main.cpp: In member function 'virtual PLUGIN_RESULT CMatchAdmin::Ne
tworkIDValidated(const char*, const char*)':
serverplugin_main.cpp:631: warning: deprecated conversion from string constant t
o 'char*'
serverplugin_main.cpp: In member function 'virtual void CSayHook::Dispatch(const
 CCommand&)':
serverplugin_main.cpp:878: warning: deprecated conversion from string constant t
o 'char*'
serverplugin_main.cpp:890: error: 'class ConVar' has no member named 'GetString'
serverplugin_main.cpp:997: error: 'class ConVar' has no member named 'GetString'
make[1]: *** [Release/Linux/serverplugin_main.o] Error 1
I've checked and made sure the bin directories are correct, I also get the same message for a smaller plugin which is almost the serverplugin_empty (upgraded with the CS:GO sdk of course).

Not quite sure what's causing the error >.<

Thanks
- Edd
PMA.Predator is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:52.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode