From: cherierm Date: Fri, 12 Sep 2008 15:01:26 +0000 (+0000) Subject: use extern keyword when you link with the static library on Windows X-Git-Tag: v3.3~178 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/db96dfead061e8f4508551e8767e2c1abc7497e2 use extern keyword when you link with the static library on Windows git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5930 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/include/xbt/misc.h b/include/xbt/misc.h index 44a3b79ba1..cfa461ea58 100644 --- a/include/xbt/misc.h +++ b/include/xbt/misc.h @@ -131,14 +131,14 @@ /* Pack everything up statically */ #elif defined(DLL_STATIC) -# define XBT_PUBLIC(type) type +# define XBT_PUBLIC(type) extern type # define XBT_EXPORT_NO_IMPORT(type) type # define XBT_IMPORT_NO_EXPORT(type) type -# define XBT_PUBLIC_DATA(type) type +# define XBT_PUBLIC_DATA(type) extern type /* Link against the DLL */ -#elif (defined(_WIN32) && !defined(DLL_EXPORT)) +#elif (defined(_WIN32) && !defined(DLL_EXPORT) && !defined(DLL_STATIC)) # define XBT_PUBLIC(type) __declspec(dllimport) type # define XBT_EXPORT_NO_IMPORT(type) type # define XBT_IMPORT_NO_EXPORT(type) __declspec(dllimport) type