diff --git a/dlls/cbase.cpp b/dlls/cbase.cpp index b0acca4..e4788ed 100644 --- a/dlls/cbase.cpp +++ b/dlls/cbase.cpp @@ -100,7 +100,7 @@ static void SetObjectCollisionBox( entvars_t *pev ); #ifndef _WIN32 extern "C" { #endif -int GetEntityAPI( DLL_FUNCTIONS *pFunctionTable, int interfaceVersion ) +int DLLEXPORT GetEntityAPI( DLL_FUNCTIONS *pFunctionTable, int interfaceVersion ) { if ( !pFunctionTable || interfaceVersion != INTERFACE_VERSION ) { @@ -111,7 +111,7 @@ int GetEntityAPI( DLL_FUNCTIONS *pFunctionTable, int interfaceVersion ) return TRUE; } -int GetEntityAPI2( DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion ) +int DLLEXPORT GetEntityAPI2( DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion ) { if ( !pFunctionTable || *interfaceVersion != INTERFACE_VERSION ) { diff --git a/dlls/h_export.cpp b/dlls/h_export.cpp index 3c650b5..603f58c 100644 --- a/dlls/h_export.cpp +++ b/dlls/h_export.cpp @@ -57,7 +57,7 @@ void DLLEXPORT GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t extern "C" { -void GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals ) +void DLLEXPORT GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals ) { memcpy(&g_engfuncs, pengfuncsFromEngine, sizeof(enginefuncs_t)); gpGlobals = pGlobals; diff --git a/dlls/util.h b/dlls/util.h index 15caa7b..4843dd3 100644 --- a/dlls/util.h +++ b/dlls/util.h @@ -85,13 +85,9 @@ typedef int BOOL; // This is the glue that hooks .MAP entity class names to our CPP classes // The _declspec forces them to be exported by name so we can do a lookup with GetProcAddress() // The function is used to intialize / allocate the object for the entity -#ifdef _WIN32 #define LINK_ENTITY_TO_CLASS(mapClassName,DLLClassName) \ - extern "C" _declspec( dllexport ) void mapClassName( entvars_t *pev ); \ + extern "C" DLLEXPORT void mapClassName( entvars_t *pev ); \ void mapClassName( entvars_t *pev ) { GetClassPtr( (DLLClassName *)pev ); } -#else -#define LINK_ENTITY_TO_CLASS(mapClassName,DLLClassName) extern "C" void mapClassName( entvars_t *pev ); void mapClassName( entvars_t *pev ) { GetClassPtr( (DLLClassName *)pev ); } -#endif //