]> git.sesse.net Git - vlc/commitdiff
Fix linking of C++ plugins
authorRémi Denis-Courmont <rem@videolan.org>
Sun, 19 Feb 2006 21:20:09 +0000 (21:20 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sun, 19 Feb 2006 21:20:09 +0000 (21:20 +0000)
include/vlc_common.h

index 4df737bf3abe62eae11e2b6be57a4a16980ea587..7a9bbae3fabb451bc9fd6d27401d2d72952e556b 100644 (file)
@@ -441,7 +441,11 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *,      /* variable's object */
  * Plug-in stuff
  *****************************************************************************/
 #if !defined (__PLUGIN__) || defined (HAVE_SHARED_LIBVLC)
-#   define VLC_EXPORT( type, name, args ) type name args
+#   ifdef __cplusplus
+#      define VLC_EXPORT( type, name, args ) extern "C" type name args
+#   else
+#      define VLC_EXPORT( type, name, args ) type name args
+#   endif
 #else
 #   define VLC_EXPORT( type, name, args ) struct _u_n_u_s_e_d_
     extern module_symbols_t* p_symbols;