Raised This Month: $ Target: $400
 0% 

Compiling Source Mod...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
InsidiousGnomes
Member
Join Date: Nov 2008
Old 11-30-2008 , 15:07   Compiling Source Mod...
Reply With Quote #1

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.

Last edited by InsidiousGnomes; 11-30-2008 at 15:10.
InsidiousGnomes is offline
 



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 18:26.


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