diff --git a/modules/access/dcp/dcp.cpp b/modules/access/dcp/dcp.cpp
index 73183b4..3e5d1f0 100644
--- a/modules/access/dcp/dcp.cpp
+++ b/modules/access/dcp/dcp.cpp
@@ -65,8 +65,10 @@ using namespace ASDCP;
                                      with Errata as of 30 August 2012" */
 
 /* Forward declarations */
-static int Open( vlc_object_t * );
-static void Close( vlc_object_t * );
+extern "C" {
+  static int Open( vlc_object_t * );
+  static void Close( vlc_object_t * );
+}
 
 /* Module descriptor */
 vlc_module_begin()
@@ -278,8 +280,10 @@ static const unsigned i_channel_mask[] =
  * Local prototypes
  *****************************************************************************/
 
-static int Demux( demux_t * );
-static int Control( demux_t *, int, va_list );
+extern "C" {
+  static int Demux( demux_t * );
+  static int Control( demux_t *, int, va_list );
+}
 
 int dcpInit ( demux_t *p_demux );
 int parseXML ( demux_t * p_demux );
diff --git a/modules/access/decklink.cpp b/modules/access/decklink.cpp
index 872a4bd..09deea5 100644
--- a/modules/access/decklink.cpp
+++ b/modules/access/decklink.cpp
@@ -38,8 +38,10 @@
 
 #include "sdi.h"
 
-static int  Open (vlc_object_t *);
-static void Close(vlc_object_t *);
+extern "C" {
+  static int  Open (vlc_object_t *);
+  static void Close(vlc_object_t *);
+}
 
 #define CARD_INDEX_TEXT N_("Input card to use")
 #define CARD_INDEX_LONGTEXT N_( \
@@ -122,7 +124,9 @@ vlc_module_begin ()
     set_callbacks(Open, Close)
 vlc_module_end ()
 
-static int Control(demux_t *, int, va_list);
+extern "C" {
+  static int Control(demux_t *, int, va_list);
+}
 
 class DeckLinkCaptureDelegate;
 
diff --git a/modules/access/dshow/dshow.cpp b/modules/access/dshow/dshow.cpp
index 785dfba..85a1706 100644
--- a/modules/access/dshow/dshow.cpp
+++ b/modules/access/dshow/dshow.cpp
@@ -60,8 +60,10 @@
 static block_t *ReadCompressed( access_t * );
 static int AccessControl ( access_t *, int, va_list );
 
-static int Demux       ( demux_t * );
-static int DemuxControl( demux_t *, int, va_list );
+extern "C" {
+  static int Demux       ( demux_t * );
+  static int DemuxControl( demux_t *, int, va_list );
+}
 
 static int OpenDevice( vlc_object_t *, access_sys_t *, std::string, bool );
 static IBaseFilter *FindCaptureDevice( vlc_object_t *, std::string *,
@@ -206,11 +208,15 @@ static const char *const ppsz_standards_list_text[] =
 static int  CommonOpen ( vlc_object_t *, access_sys_t *, bool );
 static void CommonClose( vlc_object_t *, access_sys_t * );
 
-static int  AccessOpen ( vlc_object_t * );
-static void AccessClose( vlc_object_t * );
+extern "C" {
+  static int  AccessOpen ( vlc_object_t * );
+  static void AccessClose( vlc_object_t * );
+}
 
-static int  DemuxOpen  ( vlc_object_t * );
-static void DemuxClose ( vlc_object_t * );
+extern "C" {
+  static int  DemuxOpen  ( vlc_object_t * );
+  static void DemuxClose ( vlc_object_t * );
+}
 
 vlc_module_begin ()
     set_shortname( N_("DirectShow") )
diff --git a/modules/access/live555.cpp b/modules/access/live555.cpp
index 56ecc35..e086c6e 100644
--- a/modules/access/live555.cpp
+++ b/modules/access/live555.cpp
@@ -67,8 +67,10 @@ extern "C" {
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
-static int  Open ( vlc_object_t * );
-static void Close( vlc_object_t * );
+extern "C" {
+  static int  Open ( vlc_object_t * );
+  static void Close( vlc_object_t * );
+}
 
 #define KASENNA_TEXT N_( "Kasenna RTSP dialect")
 #define KASENNA_LONGTEXT N_( "Kasenna servers use an old and nonstandard " \
@@ -250,8 +252,10 @@ public:
     demux_sys_t *p_sys;
 };
 
-static int Demux  ( demux_t * );
-static int Control( demux_t *, int, va_list );
+extern "C" {
+  static int Demux  ( demux_t * );
+  static int Control( demux_t *, int, va_list );
+}
 
 static int Connect      ( demux_t * );
 static int SessionsSetup( demux_t * );
diff --git a/modules/audio_filter/spatializer/spatializer.cpp b/modules/audio_filter/spatializer/spatializer.cpp
index 5059b83..dda16f9 100644
--- a/modules/audio_filter/spatializer/spatializer.cpp
+++ b/modules/audio_filter/spatializer/spatializer.cpp
@@ -48,8 +48,10 @@ using std::nothrow;
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
-static int  Open ( vlc_object_t * );
-static void Close( vlc_object_t * );
+extern "C" {
+  static int  Open ( vlc_object_t * );
+  static void Close( vlc_object_t * );
+}
 
 #define ROOMSIZE_TEXT N_("Room size")
 #define ROOMSIZE_LONGTEXT N_("Defines the virtual surface of the room" \
@@ -123,7 +125,9 @@ static const callback_s callbacks[] = {
 };
 enum { num_callbacks=sizeof(callbacks)/sizeof(callback_s) };
 
-static block_t *DoWork( filter_t *, block_t * );
+extern "C" {
+  static block_t *DoWork( filter_t *, block_t * );
+}
 
 /*****************************************************************************
  * Open:
diff --git a/modules/demux/adaptive/PlaylistManager.h b/modules/demux/adaptive/PlaylistManager.h
index d2ddd4c..e9f2234 100644
--- a/modules/demux/adaptive/PlaylistManager.h
+++ b/modules/demux/adaptive/PlaylistManager.h
@@ -43,6 +43,11 @@ namespace adaptive
     using namespace logic;
     using namespace http;
 
+    extern "C" {
+      typedef int(control_callback_t)(demux_t *, int, va_list);
+      typedef int(  demux_callback_t)(demux_t *);
+    }
+
     class PlaylistManager
     {
         public:
@@ -65,8 +70,8 @@ namespace adaptive
             virtual void scheduleNextUpdate();
 
             /* static callbacks */
-            static int control_callback(demux_t *, int, va_list);
-            static int demux_callback(demux_t *);
+            static control_callback_t control_callback;
+            static   demux_callback_t demux_callback;
 
         protected:
             /* Demux calls */
diff --git a/modules/demux/adaptive/adaptive.cpp b/modules/demux/adaptive/adaptive.cpp
index 8ac22cb..fd28559 100644
--- a/modules/demux/adaptive/adaptive.cpp
+++ b/modules/demux/adaptive/adaptive.cpp
@@ -60,8 +60,10 @@ using namespace smooth::playlist;
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
-static int  Open    (vlc_object_t *);
-static void Close   (vlc_object_t *);
+extern "C" {
+  static int  Open    (vlc_object_t *);
+  static void Close   (vlc_object_t *);
+}
 
 #define ADAPT_WIDTH_TEXT N_("Preferred Width")
 
diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index b8927a4..691c4da 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -45,8 +45,10 @@ extern "C" {
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
-static int  Open ( vlc_object_t * );
-static void Close( vlc_object_t * );
+extern "C" {
+  static int  Open ( vlc_object_t * );
+  static void Close( vlc_object_t * );
+}
 
 vlc_module_begin ()
     set_shortname( "Matroska" )
@@ -81,8 +83,10 @@ vlc_module_end ()
 
 struct demux_sys_t;
 
-static int  Demux  ( demux_t * );
-static int  Control( demux_t *, int, va_list );
+extern "C" {
+  static int  Demux  ( demux_t * );
+  static int  Control( demux_t *, int, va_list );
+}
 static void Seek   ( demux_t *, mtime_t i_mk_date, double f_percent, virtual_chapter_c *p_chapter );
 
 /*****************************************************************************
diff --git a/modules/demux/sid.cpp b/modules/demux/sid.cpp
index b095d71..03abdac 100644
--- a/modules/demux/sid.cpp
+++ b/modules/demux/sid.cpp
@@ -45,8 +45,10 @@
 
 #include <new>
 
-static int  Open (vlc_object_t *);
-static void Close (vlc_object_t *);
+extern "C" {
+  static int  Open (vlc_object_t *);
+  static void Close (vlc_object_t *);
+}
 
 vlc_module_begin ()
     set_shortname ("sid")
@@ -72,8 +74,10 @@ struct demux_sys_t
 };
 
 
-static int Demux (demux_t *);
-static int Control (demux_t *, int, va_list);
+extern "C" {
+  static int Demux (demux_t *);
+  static int Control (demux_t *, int, va_list);
+}
 
 static int Open (vlc_object_t *obj)
 {
diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index 43ba185..98fe304 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -67,14 +67,17 @@
 /*****************************************************************************
  * Local prototypes.
  *****************************************************************************/
-static int  OpenIntf     ( vlc_object_t * );
-static int  OpenDialogs  ( vlc_object_t * );
-static int  Open         ( vlc_object_t *, bool );
-static void Close        ( vlc_object_t * );
-static int  WindowOpen   ( vout_window_t *, const vout_window_cfg_t * );
-static void WindowClose  ( vout_window_t * );
-static void *Thread      ( void * );
-static void ShowDialog   ( intf_thread_t *, int, int, intf_dialog_args_t * );
+
+extern "C" {
+  static int  OpenIntf     ( vlc_object_t * );
+  static int  OpenDialogs  ( vlc_object_t * );
+  static int  Open         ( vlc_object_t *, bool );
+  static void Close        ( vlc_object_t * );
+  static int  WindowOpen   ( vout_window_t *, const vout_window_cfg_t * );
+  static void WindowClose  ( vout_window_t * );
+  static void *Thread      ( void * );
+  static void ShowDialog   ( intf_thread_t *, int, int, intf_dialog_args_t * );
+}
 
 /*****************************************************************************
  * Module descriptor
@@ -653,7 +656,9 @@ static void ShowDialog( intf_thread_t *p_intf, int i_dialog_event, int i_arg,
  *
  * TODO move it out of here ?
  */
-static int WindowControl( vout_window_t *, int i_query, va_list );
+extern "C" {
+  static int WindowControl( vout_window_t *, int i_query, va_list );
+}
 
 static int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t *cfg )
 {
diff --git a/modules/gui/skins2/src/skin_main.cpp b/modules/gui/skins2/src/skin_main.cpp
index 0d2c2a2..f2ca4b0 100644
--- a/modules/gui/skins2/src/skin_main.cpp
+++ b/modules/gui/skins2/src/skin_main.cpp
@@ -60,8 +60,10 @@
 //---------------------------------------------------------------------------
 // Local prototypes
 //---------------------------------------------------------------------------
-static int  Open  ( vlc_object_t * );
-static void Close ( vlc_object_t * );
+extern "C" {
+  static int  Open  ( vlc_object_t * );
+  static void Close ( vlc_object_t * );
+}
 static void *Run  ( void * );
 
 static struct
@@ -319,9 +321,11 @@ end:
     return NULL;
 }
 
-static int  WindowOpen( vout_window_t *, const vout_window_cfg_t * );
-static void WindowClose( vout_window_t * );
-static int  WindowControl( vout_window_t *, int, va_list );
+extern "C" {
+  static int  WindowOpen( vout_window_t *, const vout_window_cfg_t * );
+  static void WindowClose( vout_window_t * );
+  static int  WindowControl( vout_window_t *, int, va_list );
+}
 
 struct vout_window_sys_t
 {
diff --git a/modules/keystore/kwallet.cpp b/modules/keystore/kwallet.cpp
index 902fb09..38219fe 100644
--- a/modules/keystore/kwallet.cpp
+++ b/modules/keystore/kwallet.cpp
@@ -39,8 +39,10 @@
 #define qfu(i) QString::fromUtf8(i)
 #define qtu(i) ((i).toUtf8().constData())
 
-static int Open(vlc_object_t *);
-static void Close(vlc_object_t *);
+extern "C" {
+  static int Open(vlc_object_t *);
+  static void Close(vlc_object_t *);
+}
 
 vlc_module_begin()
     set_shortname(N_("KWallet keystore"))
@@ -640,6 +642,13 @@ VLCKWallet::mainloopRemove(const char * const *ppsz_values,
     }
 }
 
+
+
+extern "C" {
+  static int
+  Store(vlc_keystore *p_keystore, const char * const ppsz_values[KEY_MAX],
+        const uint8_t *p_secret, size_t i_secret_len, const char *psz_label);
+}
 static int
 Store(vlc_keystore *p_keystore, const char * const ppsz_values[KEY_MAX],
       const uint8_t *p_secret, size_t i_secret_len, const char *psz_label)
@@ -649,6 +658,13 @@ Store(vlc_keystore *p_keystore, const char * const ppsz_values[KEY_MAX],
     return p_wallet->store(ppsz_values, p_secret, i_secret_len, psz_label);
 }
 
+
+
+extern "C" {
+  static unsigned int
+  Find(vlc_keystore *p_keystore, const char * const ppsz_values[KEY_MAX],
+       vlc_keystore_entry **pp_entries);
+}
 static unsigned int
 Find(vlc_keystore *p_keystore, const char * const ppsz_values[KEY_MAX],
      vlc_keystore_entry **pp_entries)
@@ -658,6 +674,12 @@ Find(vlc_keystore *p_keystore, const char * const ppsz_values[KEY_MAX],
     return p_wallet->find(ppsz_values, pp_entries);
 }
 
+
+
+extern "C" {
+  static unsigned int
+  Remove(vlc_keystore *p_keystore, const char * const ppsz_values[KEY_MAX]);
+}
 static unsigned int
 Remove(vlc_keystore *p_keystore, const char * const ppsz_values[KEY_MAX])
 {
diff --git a/modules/meta_engine/taglib.cpp b/modules/meta_engine/taglib.cpp
index 4a1a15b..d9f74c9 100644
--- a/modules/meta_engine/taglib.cpp
+++ b/modules/meta_engine/taglib.cpp
@@ -139,8 +139,10 @@ static bool b_extensions_registered = false;
 static vlc_mutex_t taglib_lock = VLC_STATIC_MUTEX;
 
 // Local functions
-static int ReadMeta    ( vlc_object_t * );
-static int WriteMeta   ( vlc_object_t * );
+extern "C" {
+  static int ReadMeta    ( vlc_object_t * );
+  static int WriteMeta   ( vlc_object_t * );
+}
 
 vlc_module_begin ()
     set_capability( "meta reader", 1000 )
diff --git a/modules/services_discovery/upnp.cpp b/modules/services_discovery/upnp.cpp
index f281539..5c7bc89 100644
--- a/modules/services_discovery/upnp.cpp
+++ b/modules/services_discovery/upnp.cpp
@@ -78,16 +78,16 @@ vlc_mutex_t UpnpInstanceWrapper::s_lock = VLC_STATIC_MUTEX;
 /*
  * VLC callback prototypes
  */
-namespace SD
+extern "C"
 {
-    static int Open( vlc_object_t* );
-    static void Close( vlc_object_t* );
+    static int SD_Open( vlc_object_t* );
+    static void SD_Close( vlc_object_t* );
 }
 
-namespace Access
+extern "C"
 {
-    static int Open( vlc_object_t* );
-    static void Close( vlc_object_t* );
+    static int Access_Open( vlc_object_t* );
+    static void Access_Close( vlc_object_t* );
 }
 
 VLC_SD_PROBE_HELPER( "upnp", "Universal Plug'n'Play", SD_CAT_LAN )
@@ -101,7 +101,7 @@ vlc_module_begin()
     set_category( CAT_PLAYLIST );
     set_subcategory( SUBCAT_PLAYLIST_SD );
     set_capability( "services_discovery", 0 );
-    set_callbacks( SD::Open, SD::Close );
+    set_callbacks( SD_Open, SD_Close );
 
     set_description( N_("SAT>IP") )
     add_string( "satip-satellite", "ASTRA_19_2E", SATIP_SATELLITE,
@@ -112,7 +112,7 @@ vlc_module_begin()
     add_submodule()
         set_category( CAT_INPUT )
         set_subcategory( SUBCAT_INPUT_ACCESS )
-        set_callbacks( Access::Open, Access::Close )
+        set_callbacks( Access_Open, Access_Close )
         set_capability( "access", 0 )
 
     VLC_SD_PROBE_SUBMODULE
@@ -221,62 +221,6 @@ SearchThread( void *p_data )
     return NULL;
 }
 
-/*
- * Initializes UPNP instance.
- */
-static int Open( vlc_object_t *p_this )
-{
-    services_discovery_t *p_sd = ( services_discovery_t* )p_this;
-    services_discovery_sys_t *p_sys  = ( services_discovery_sys_t * )
-            calloc( 1, sizeof( services_discovery_sys_t ) );
-
-    if( !( p_sd->p_sys = p_sys ) )
-        return VLC_ENOMEM;
-
-    p_sys->p_server_list = new(std::nothrow) SD::MediaServerList( p_sd );
-    if ( unlikely( p_sys->p_server_list == NULL ) )
-    {
-        free(p_sys);
-        return VLC_ENOMEM;
-    }
-
-    p_sys->p_upnp = UpnpInstanceWrapper::get( p_this, SD::MediaServerList::Callback, p_sys->p_server_list );
-    if ( !p_sys->p_upnp )
-    {
-        delete p_sys->p_server_list;
-        free(p_sys);
-        return VLC_EGENERIC;
-    }
-
-    /* XXX: Contrary to what the libupnp doc states, UpnpSearchAsync is
-     * blocking (select() and send() are called). Therefore, Call
-     * UpnpSearchAsync from an other thread. */
-    if ( vlc_clone( &p_sys->thread, SearchThread, p_this,
-                    VLC_THREAD_PRIORITY_LOW ) )
-    {
-        p_sys->p_upnp->release( true );
-        delete p_sys->p_server_list;
-        free(p_sys);
-        return VLC_EGENERIC;
-    }
-
-    return VLC_SUCCESS;
-}
-
-/*
- * Releases resources.
- */
-static void Close( vlc_object_t *p_this )
-{
-    services_discovery_t *p_sd = ( services_discovery_t* )p_this;
-    services_discovery_sys_t *p_sys = p_sd->p_sys;
-
-    vlc_join( p_sys->thread, NULL );
-    p_sys->p_upnp->release( true );
-    delete p_sys->p_server_list;
-    free( p_sys );
-}
-
 MediaServerDesc::MediaServerDesc( const std::string& udn, const std::string& fName,
                                   const std::string& loc, const std::string& iconUrl )
     : UDN( udn )
@@ -696,6 +640,65 @@ int MediaServerList::Callback( Upnp_EventType event_type, void* p_event, void* p
 
 }
 
+/*
+ * Initializes UPNP instance.
+ */
+static int SD_Open( vlc_object_t *p_this )
+{
+    using namespace SD;
+
+    services_discovery_t *p_sd = ( services_discovery_t* )p_this;
+    services_discovery_sys_t *p_sys  = ( services_discovery_sys_t * )
+            calloc( 1, sizeof( services_discovery_sys_t ) );
+
+    if( !( p_sd->p_sys = p_sys ) )
+        return VLC_ENOMEM;
+
+    p_sys->p_server_list = new(std::nothrow) SD::MediaServerList( p_sd );
+    if ( unlikely( p_sys->p_server_list == NULL ) )
+    {
+        free(p_sys);
+        return VLC_ENOMEM;
+    }
+
+    p_sys->p_upnp = UpnpInstanceWrapper::get( p_this, SD::MediaServerList::Callback, p_sys->p_server_list );
+    if ( !p_sys->p_upnp )
+    {
+        delete p_sys->p_server_list;
+        free(p_sys);
+        return VLC_EGENERIC;
+    }
+
+    /* XXX: Contrary to what the libupnp doc states, UpnpSearchAsync is
+     * blocking (select() and send() are called). Therefore, Call
+     * UpnpSearchAsync from an other thread. */
+    if ( vlc_clone( &p_sys->thread, SearchThread, p_this,
+                    VLC_THREAD_PRIORITY_LOW ) )
+    {
+        p_sys->p_upnp->release( true );
+        delete p_sys->p_server_list;
+        free(p_sys);
+        return VLC_EGENERIC;
+    }
+
+    return VLC_SUCCESS;
+}
+
+/*
+ * Releases resources.
+ */
+static void SD_Close( vlc_object_t *p_this )
+{
+    services_discovery_t *p_sd = ( services_discovery_t* )p_this;
+    services_discovery_sys_t *p_sys = p_sd->p_sys;
+
+    vlc_join( p_sys->thread, NULL );
+    p_sys->p_upnp->release( true );
+    delete p_sys->p_server_list;
+    free( p_sys );
+}
+
+
 namespace Access
 {
 
@@ -1063,12 +1066,22 @@ input_item_t* MediaServer::getNextItem()
     return p_item;
 }
 
-static input_item_t* ReadDirectory( access_t *p_access )
+
+
+extern "C" {
+  input_item_t* ReadDirectory( access_t *p_access );
+}
+input_item_t* ReadDirectory( access_t *p_access )
 {
     return p_access->p_sys->p_server->getNextItem();
 }
 
-static int ControlDirectory( access_t *p_access, int i_query, va_list args )
+
+
+extern "C" {
+  int ControlDirectory( access_t *p_access, int i_query, va_list args );
+}
+int ControlDirectory( access_t *p_access, int i_query, va_list args )
 {
     switch( i_query )
     {
@@ -1083,8 +1096,12 @@ static int ControlDirectory( access_t *p_access, int i_query, va_list args )
     return VLC_SUCCESS;
 }
 
-static int Open( vlc_object_t *p_this )
+}
+
+static int Access_Open( vlc_object_t *p_this )
 {
+    using namespace Access;
+
     access_t* p_access = (access_t*)p_this;
     access_sys_t* p_sys = new(std::nothrow) access_sys_t;
     if ( unlikely( !p_sys ) )
@@ -1111,7 +1128,7 @@ static int Open( vlc_object_t *p_this )
     return VLC_SUCCESS;
 }
 
-static void Close( vlc_object_t* p_this )
+static void Access_Close( vlc_object_t* p_this )
 {
     access_t* p_access = (access_t*)p_this;
     p_access->p_sys->p_upnp->release( false );
@@ -1119,7 +1136,6 @@ static void Close( vlc_object_t* p_this )
     delete p_access->p_sys;
 }
 
-}
 
 UpnpInstanceWrapper::UpnpInstanceWrapper()
     : handle_( -1 )
diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index c97511a..041fab7 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -61,8 +61,10 @@ struct sout_stream_sys_t
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
-static int Open(vlc_object_t *);
-static void Close(vlc_object_t *);
+extern "C" {
+  static int Open(vlc_object_t *);
+  static void Close(vlc_object_t *);
+}
 static void Clean(sout_stream_t *p_stream);
 
 static const char *const ppsz_sout_options[] = {
@@ -101,6 +103,9 @@ vlc_module_end ()
 /*****************************************************************************
  * Sout callbacks
  *****************************************************************************/
+extern "C" {
+  static sout_stream_id_sys_t *Add(sout_stream_t *p_stream, const es_format_t *p_fmt);
+}
 static sout_stream_id_sys_t *Add(sout_stream_t *p_stream, const es_format_t *p_fmt)
 {
     sout_stream_sys_t *p_sys = p_stream->p_sys;
@@ -109,6 +114,10 @@ static sout_stream_id_sys_t *Add(sout_stream_t *p_stream, const es_format_t *p_f
 }
 
 
+
+extern "C" {
+  static void Del(sout_stream_t *p_stream, sout_stream_id_sys_t *id);
+}
 static void Del(sout_stream_t *p_stream, sout_stream_id_sys_t *id)
 {
     sout_stream_sys_t *p_sys = p_stream->p_sys;
@@ -117,6 +126,10 @@ static void Del(sout_stream_t *p_stream, sout_stream_id_sys_t *id)
 }
 
 
+
+extern "C" {
+  static int Send(sout_stream_t *p_stream, sout_stream_id_sys_t *id, block_t *p_buffer);
+}
 static int Send(sout_stream_t *p_stream, sout_stream_id_sys_t *id,
                 block_t *p_buffer)
 {
@@ -125,6 +138,11 @@ static int Send(sout_stream_t *p_stream, sout_stream_id_sys_t *id,
     return sout_StreamIdSend(p_sys->p_out, id, p_buffer);
 }
 
+
+
+extern "C" {
+  static void Flush( sout_stream_t *p_stream, sout_stream_id_sys_t *id );
+}
 static void Flush( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
 {
     sout_stream_sys_t *p_sys = p_stream->p_sys;
@@ -132,6 +150,11 @@ static void Flush( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
     sout_StreamFlush( p_sys->p_out, id );
 }
 
+
+
+extern "C" {
+  static int Control(sout_stream_t *p_stream, int i_query, va_list args);
+}
 static int Control(sout_stream_t *p_stream, int i_query, va_list args)
 {
     sout_stream_sys_t *p_sys = p_stream->p_sys;
diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index c751177..6344390 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -67,8 +67,10 @@ static const std::string NAMESPACE_RECEIVER         = "urn:x-cast:com.google.cas
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
-static int Open(vlc_object_t *);
-static void Close(vlc_object_t *);
+extern "C" {
+  static int Open(vlc_object_t *);
+  static void Close(vlc_object_t *);
+}
 static void Clean(intf_thread_t *);
 
 static void *ChromecastThread(void *data);
diff --git a/modules/text_renderer/sapi.cpp b/modules/text_renderer/sapi.cpp
index 9f183b6..076f07f 100644
--- a/modules/text_renderer/sapi.cpp
+++ b/modules/text_renderer/sapi.cpp
@@ -43,12 +43,14 @@
 #include <sapi.h>
 #include <sphelper.h>
 
-static int Create (vlc_object_t *);
-static void Destroy(vlc_object_t *);
-static int RenderText(filter_t *,
-                      subpicture_region_t *,
-                      subpicture_region_t *,
-                      const vlc_fourcc_t *);
+extern "C" {
+  static  int Create (vlc_object_t *);
+  static void Destroy(vlc_object_t *);
+  static int RenderText(filter_t *,
+                        subpicture_region_t *,
+                        subpicture_region_t *,
+                        const vlc_fourcc_t *);
+}
 
 vlc_module_begin ()
  set_description(N_("Speech synthesis for Windows"))
diff --git a/modules/video_filter/blend.cpp b/modules/video_filter/blend.cpp
index 0da5a0e..d63c82c 100644
--- a/modules/video_filter/blend.cpp
+++ b/modules/video_filter/blend.cpp
@@ -36,8 +36,11 @@
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
-static int  Open (vlc_object_t *);
-static void Close(vlc_object_t *);
+extern "C" {
+  static int  Open (vlc_object_t *);
+  static void Close(vlc_object_t *);
+  static void Blend(filter_t *, picture_t *, const picture_t *, int, int, int);
+}
 
 vlc_module_begin()
     set_description(N_("Video pictures blending"))
diff --git a/modules/video_filter/opencv_example.cpp b/modules/video_filter/opencv_example.cpp
index fc022e3..87a375f 100644
--- a/modules/video_filter/opencv_example.cpp
+++ b/modules/video_filter/opencv_example.cpp
@@ -59,10 +59,13 @@ struct filter_sys_t
 /****************************************************************************
  * Local prototypes
  ****************************************************************************/
-static int  OpenFilter ( vlc_object_t * );
-static void CloseFilter( vlc_object_t * );
+extern "C" {
+  static int   OpenFilter( vlc_object_t * );
+  static void CloseFilter( vlc_object_t * );
+
+  static picture_t *Filter( filter_t *, picture_t * );
+}
 
-static picture_t *Filter( filter_t *, picture_t * );
 
 /*****************************************************************************
  * Module descriptor
diff --git a/modules/video_output/decklink.cpp b/modules/video_output/decklink.cpp
index 4791d2b..51a90e2 100644
--- a/modules/video_output/decklink.cpp
+++ b/modules/video_output/decklink.cpp
@@ -160,10 +160,12 @@ struct decklink_sys_t
  * Local prototypes.
  *****************************************************************************/
 
-static int  OpenVideo           (vlc_object_t *);
-static void CloseVideo          (vlc_object_t *);
-static int  OpenAudio           (vlc_object_t *);
-static void CloseAudio          (vlc_object_t *);
+extern "C" {
+  static int   OpenVideo (vlc_object_t *);
+  static void CloseVideo (vlc_object_t *);
+  static int   OpenAudio (vlc_object_t *);
+  static void CloseAudio (vlc_object_t *);
+}
 
 /*****************************************************************************
  * Module descriptor
@@ -577,6 +579,9 @@ static void v210_convert(void *frame_bytes, picture_t *pic, int dst_stride)
     }
 }
 
+extern "C" {
+  static void DisplayVideo(vout_display_t *vd, picture_t *picture, subpicture_t *);
+}
 static void DisplayVideo(vout_display_t *vd, picture_t *picture, subpicture_t *)
 {
     vout_display_sys_t *sys = vd->sys;
@@ -675,6 +680,9 @@ end:
     picture_Release(orig_picture);
 }
 
+extern "C" {
+  static int ControlVideo(vout_display_t *vd, int query, va_list args)
+}
 static int ControlVideo(vout_display_t *vd, int query, va_list args)
 {
     (void) vd; (void) query; (void) args;
diff --git a/modules/visualization/projectm.cpp b/modules/visualization/projectm.cpp
index 7908d7a..138da5e 100644
--- a/modules/visualization/projectm.cpp
+++ b/modules/visualization/projectm.cpp
@@ -39,8 +39,10 @@
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
-static int  Open         ( vlc_object_t * );
-static void Close        ( vlc_object_t * );
+extern "C" {
+  static int  Open         ( vlc_object_t * );
+  static void Close        ( vlc_object_t * );
+}
 
 #define CONFIG_TEXT N_("projectM configuration file")
 #define CONFIG_LONGTEXT N_("File that will be used to configure the projectM " \
@@ -145,8 +147,10 @@ struct filter_sys_t
 };
 
 
-static block_t *DoWork( filter_t *, block_t * );
-static void *Thread( void * );
+extern "C" {
+  static block_t *DoWork( filter_t *, block_t * );
+  static void *Thread( void * );
+}
 
 /**
  * Open the module
diff --git a/modules/visualization/vsxu.cpp b/modules/visualization/vsxu.cpp
index a58e162..d23af2a 100644
--- a/modules/visualization/vsxu.cpp
+++ b/modules/visualization/vsxu.cpp
@@ -46,8 +46,10 @@
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
-static int  Open         ( vlc_object_t * );
-static void Close        ( vlc_object_t * );
+extern "C" {
+  static int  Open         ( vlc_object_t * );
+  static void Close        ( vlc_object_t * );
+}
 
 #define WIDTH_TEXT N_("Video width")
 #define WIDTH_LONGTEXT N_("The width of the video window, in pixels.")
@@ -92,8 +94,10 @@ struct filter_sys_t
     bool b_quit;
 };
 
-static block_t *DoWork( filter_t *, block_t * );
-static void *Thread( void * );
+extern "C" {
+  static block_t *DoWork( filter_t *, block_t * );
+  static void *Thread( void * );
+}
 
 /**
  * Open the module