AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Coding MM:S Plugins & SM Extensions (https://forums.alliedmods.net/forumdisplay.php?f=75)
-   -   Solved Compiling for TF2 with orangeboxvalve (https://forums.alliedmods.net/showthread.php?t=309339)

Phil25 07-22-2018 11:55

Compiling for TF2 with orangeboxvalve
 
I'm trying to compile VoiceHook2 for TF2.

It compiled with hl2sdk-tf2 successfully. But when I loaded it, it gave me "undefined symbol OnDependenciesDroppedEv".

I see that TF2Items used to use orangeboxvalve before switching to AMBuild. However, there isn't an ob-valve or ep2v in the HL2 SDK mirror branches. I've found hl2sdk-ob-valve here, but the last commit was in 2013 and the GitHub link 404's. The compilation with that hl2sdk-ob-valve fails with this error:
PHP Code:

In file included from ../../../hl2sdk-ob-valve/public/tier1/utlvector.h:23,
                 
from ../../../hl2sdk-ob-valve/public/tier1/convar.h:21,
                 
from ../../../hl2sdk-ob-valve/public/eiface.h:16,
                 
from ../../../mmsource-1.10.6/core/ISmmAPI.h:46,
                 
from ../../../mmsource-1.10.6/core/ISmmPlugin.h:39,
                 
from sdk/smsdk_ext.h:102,
                 
from sdk/smsdk_ext.cpp:34:
../../../
hl2sdk-ob-valve/public/tier1/utlmemory.hIn member function ‘void CUtlMemory<TI>::Swap(CUtlMemory<TI>&):
../../../
hl2sdk-ob-valve/public/tier1/utlmemory.h:350:2errorthere are no arguments to ‘swap’ that depend on a template parameterso a declaration of ‘swap’ must be available [-fpermissive]
  
swapm_nGrowSizemem.m_nGrowSize );
  ^~~~
../../../
hl2sdk-ob-valve/public/tier1/utlmemory.h:350:2note: (if you use -fpermissive’G++ will accept your codebut allowing the use of an undeclared name is deprecated)
../../../
hl2sdk-ob-valve/public/tier1/utlmemory.h:352:2errorthere are no arguments to ‘swap’ that depend on a template parameterso a declaration of ‘swap’ must be available [-fpermissive]
  
swapm_nAllocationCountmem.m_nAllocationCount );
  ^~~~
make[1]: *** [Makefile:161Release.orangeboxvalve/sdk/smsdk_ext.oError 1
make
: *** [Makefile:169allError 2 

I'm quite new to extensions and barely know anything about AMBuild, so I can't assess the situation well.

Is it the extension's fault for not working with hl2sdk-tf2 and is using orangeboxvalve outdated? Would building it with AMBuild fix anything?

Fyren 07-22-2018 18:14

Re: Compiling for TF2 with orangeboxvalve
 
The error about OnDependenciesDropped is because the code is years old and that function has since been added to one of the SM interfaces. You will either have to compile against an ancient version of SM or update the code.

The orangeboxvalve branch of the hl2sdk is obsolete. It was for first-party Valve games that shared engine code (or close enough), but those games diverged and the SDKs were split out.

Phil25 07-23-2018 15:13

Re: Compiling for TF2 with orangeboxvalve
 
Yes, that's true, it's outdated. It turned out it was using very old smsdk_ext.ccp and .h instead of referencing the up to date ones. It compiled when I replaced them and is working more or less with some stability issues, but that's on me then.

Thanks for clearing it up for me, I'm gonna use the hl2sdk-tf2 then.


All times are GMT -4. The time now is 12:21.

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