From 12eb8c5a8746579e2d41eda83391cbc4e165f658 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Fri, 12 Oct 2007 22:54:18 +0000 Subject: [PATCH] fix loading on windows git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5858 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/softtimer.c | 3 +++ src/switch_loadable_module.c | 6 ++++++ w32/Library/FreeSwitchCore.vcproj | 8 ++++++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/softtimer.c b/src/softtimer.c index bc389ff35e..cb09441d69 100644 --- a/src/softtimer.c +++ b/src/softtimer.c @@ -48,6 +48,9 @@ static struct { switch_mutex_t *mutex; } globals; +#undef SWITCH_MOD_DECLARE_DATA +#define SWITCH_MOD_DECLARE_DATA __declspec(dllexport) + SWITCH_MODULE_LOAD_FUNCTION(softtimer_load); SWITCH_MODULE_SHUTDOWN_FUNCTION(softtimer_shutdown); SWITCH_MODULE_RUNTIME_FUNCTION(softtimer_runtime); diff --git a/src/switch_loadable_module.c b/src/switch_loadable_module.c index b158699095..40de728315 100644 --- a/src/switch_loadable_module.c +++ b/src/switch_loadable_module.c @@ -660,7 +660,13 @@ static switch_status_t switch_loadable_module_load_file(char *path, char *filena struct_name = switch_core_sprintf(pool, "%s_module_interface", filename); +#ifdef WIN32 + status = switch_dso_load(&dso, "FreeSwitch.dll", loadable_modules.pool); +#elif defined(DARWIN) + status = switch_dso_load(&dso, "libfreeswitch.dylib", loadable_modules.pool); +#else status = switch_dso_load(&dso, NULL, loadable_modules.pool); +#endif status = switch_dso_sym(&interface_struct_handle, dso, struct_name); if (!interface_struct_handle) { diff --git a/w32/Library/FreeSwitchCore.vcproj b/w32/Library/FreeSwitchCore.vcproj index 7b9d3e5a27..2f8ef920c5 100644 --- a/w32/Library/FreeSwitchCore.vcproj +++ b/w32/Library/FreeSwitchCore.vcproj @@ -208,6 +208,10 @@ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > + + @@ -475,11 +479,11 @@ >