I'm trying to compile source mod in order to create a lib file that my extension can link to. This is because of the problem I'm having
here. I've been in link error hell for the past week so any help you could give me would be greatly appreciated.
When I open the sourcemodsdk/core/msvc8 project files and compile a release - Episode 1 build, I get the following errors:
Code:
..\CoreConfig.cpp(159) : error C2660: '__SourceHook_FHAddConCommandDispatch' : function does not take 4 arguments
..\CoreConfig.cpp(160) : error C2660: '__SourceHook_FHAddConCommandDispatch' : function does not take 4 arguments
..\NextMap.cpp(84) : error C2660: '__SourceHook_FHAddConCommandDispatch' : function does not take 4 arguments
When I double click on the error it takes me to here:
CoreConfig.cpp : 159
Code:
SH_ADD_HOOK_STATICFUNC(ConCommand, Dispatch, g_pExecPtr, Hook_ExecDispatchPre, false);
SH_ADD_HOOK_STATICFUNC(ConCommand, Dispatch, g_pExecPtr, Hook_ExecDispatchPost, true);
And when I look up the definition of SH_HOOK_STATICFUNC:
It takes me to sourcehook.h
Code:
#define SH_ADD_HOOK_STATICFUNC(ifacetype, ifacefunc, ifaceptr, handler, post) \
SH_ADD_HOOK(ifacetype, ifacefunc, ifaceptr, SH_STATIC(handler), post)
And when I look up what SH_ADD_HOOK is it takes me to somewhere else in sourcehook.h, to this:
Code:
#define SH_ADD_HOOK(ifacetype, ifacefunc, ifaceptr, handler, post) \
__SourceHook_FHAdd##ifacetype##ifacefunc((void*)SourceHook::implicit_cast<ifacetype*>(ifaceptr), \
SourceHook::ISourceHook::Hook_Normal, post, handler)
And this is where I can see that FHAdd is in fact passing 4 arguments, however I cannot find the definition of FHAdd so I don't know how many arguments it's supposed to take or what they are. However I did find this:
Code:
#if SH_IMPL_VERSION >= 5
extern int __SourceHook_FHAddConCommandDispatch(void *, ISourceHook::AddHookMode, bool, class fastdelegate::FastDelegate0<void>);
which *is* taking 4 arguments. Can anyone help me with these compiling errors? It would really make my day :-)
One last thing: I'm compiling with visual studio 2008.