Help getting Spirit of Half-Life working Created 8 years ago2015-12-04 08:25:42 UTC by usbpetrock usbpetrock

Created 8 years ago2015-12-04 08:25:42 UTC by usbpetrock usbpetrock

Posted 8 years ago2015-12-04 08:26:11 UTC Post #327663
I'm trying to compile SoHL 1.8 for Linux, using modified Makefiles from the GitHub repository for Half-Life. When I try to compile the server library, I get a few error messages:
[quote]
../dlls/weapon_generic.cpp:44:54: error: no 'void CBasePlayerWeapon::KeyValue(KeyValueData*)' member function declared in class 'CBasePlayerWeapon'
void CBasePlayerWeapon::KeyValue( KeyValueData *pkvd )//this sets for custom fields of weapon_generic. G-Cont.
^
In file included from ../dlls/weapon_generic.cpp:20:0:
../dlls/weapon_generic.cpp: In member function 'virtual void CWpnGeneric::Spawn()':
../dlls/weapon_generic.cpp:76:30: error: 'w_model' was not declared in this scope
SET_MODEL( ENT(pev), STRING(w_model) );
^
../dlls/util.h:33:70: note: in definition of macro 'STRING'
#define STRING(offset) (const char *)(gpGlobals->pStringBase + (int)offset)
^
../dlls/weapon_generic.cpp: In member function 'virtual void CWpnGeneric::Precache()':
../dlls/weapon_generic.cpp:95:20: error: 'v_model' was not declared in this scope
if (!FStringNull (v_model) )//Shut down first call, from "UTIL_PrecacheOtherWeapon"
^
In file included from ../dlls/weapon_generic.cpp:20:0:
../dlls/weapon_generic.cpp:98:47: error: 'p_model' was not declared in this scope
ALERT (at_debug, "p_model is %s \n",STRING( p_model));
^
../dlls/util.h:33:70: note: in definition of macro 'STRING'
#define STRING(offset) (const char *)(gpGlobals->pStringBase + (int)offset)
^
../dlls/weapon_generic.cpp:99:47: error: 'w_model' was not declared in this scope
ALERT (at_debug, "w_model is %s \n",STRING( w_model));
^
../dlls/util.h:33:70: note: in definition of macro 'STRING'
#define STRING(offset) (const char *)(gpGlobals->pStringBase + (int)offset)
^
../dlls/weapon_generic.cpp:103:20: error: 'v_model' was not declared in this scope
if (!FStringNull (v_model) )
^
In file included from ../dlls/weapon_generic.cpp:20:0:
../dlls/weapon_generic.cpp:106:34: error: 'p_model' was not declared in this scope
PRECACHE_MODEL( (char *)STRING(p_model) );//right adding into HUD.ammo registry. don't worry about
^
../dlls/util.h:33:70: note: in definition of macro 'STRING'
#define STRING(offset) (const char *)(gpGlobals->pStringBase + (int)offset)
^
../dlls/weapon_generic.cpp:107:34: error: 'w_model' was not declared in this scope
PRECACHE_MODEL( (char *)STRING(w_model) );//this ;) G-Cont.
^
../dlls/util.h:33:70: note: in definition of macro 'STRING'
#define STRING(offset) (const char *)(gpGlobals->pStringBase + (int)offset)
^
../dlls/weapon_generic.cpp:116:45: error: 'UTIL_PrecacheOtherWeapon' was not declared in this scope
UTIL_PrecacheOtherWeapon ("weapon_generic");
^
../dlls/weapon_generic.cpp: In member function 'virtual BOOL CWpnGeneric::Deploy()':
../dlls/weapon_generic.cpp:142:30: error: 'v_model' was not declared in this scope
m_pPlayer->pev->viewmodel = v_model;
^
../dlls/weapon_generic.cpp:143:32: error: 'p_model' was not declared in this scope
m_pPlayer->pev->weaponmodel = p_model;
^
make[1]: *** [release/obj/hldll/weapon_generic.o] Error 1
make[1]: Leaving directory `/home/declan/infinitysdk/Infinity SDK 1.6/Search for David/SpiritSource18/linux'
make: *** [hl] Error 2
[/quote]
Okay, more than a few. I removed weapon_generic.cpp from the Makefile (temporarily! I'm not stupid enough to use that as a permanent solution, but I don't know how to deal with the error messages) and the compile succeeded, but when I tried to start a game using this server library, I got this:
LoadLibrary failed on home/declan.local/share/Steam/steamapps/common/Half-Life/TestMod/dlls/spirit.so:
home/declan.local/share/Steam/steamapps/common/Half-Life/TestMod/dlls/spirit.so: undefined symbol: _Z16HaveCamerasInPVSP7edict_s
Host Error: Couldn't get DLL API from home/declan.local/share/Steam/steamapps/common/Half-Life/TestMod/dlls/spirit.so!
I have a reasonable amount of experience with Linux, but the Half-Life source code is mystifying to me, probably because it's poorly documented and out of date. It seems there are a few people out there who are really good at this sort of thing, so I decided to come here to see if anyone knew what my problem is.
Posted 8 years ago2015-12-04 08:31:03 UTC Post #327664
I have heard that sohl code is way messier than the original hl code...
Posted 8 years ago2015-12-06 00:35:09 UTC Post #327674
Well, yes, but that doesn't mean it shouldn't be able to compile out of the box. This isn't even an OS-specific thing! I can't understand why it doesn't know all these variables.
Posted 8 years ago2015-12-09 00:14:07 UTC Post #327691
Hm I can't help you on this one.. But I would suggest to use the sohl source code of either version 1.2 or 1.4 these were the most stable and less bugged versions of that.

As for the github code.. Might be unfinished not sure. I know which page you got these from. It should've been documented if it was finished or Wip.
You must be logged in to post a response.