From d37ac0c26e273f6dff21e80efff680d691453f78 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Thu, 10 Aug 2017 10:01:40 +0200 Subject: [PATCH] 0028983: Configuration - HAVE_NO_DLL causes compilation to fail on MSVC --- src/Standard/Standard_Macro.hxx | 40 ++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/src/Standard/Standard_Macro.hxx b/src/Standard/Standard_Macro.hxx index a81da00d3a..fd04320593 100644 --- a/src/Standard/Standard_Macro.hxx +++ b/src/Standard/Standard_Macro.hxx @@ -72,23 +72,7 @@ #define Standard_ENABLE_DEPRECATION_WARNINGS #endif -//====================================================== -// Windows-specific definitions -//====================================================== - -# if defined(_WIN32) && !defined(HAVE_NO_DLL) - -# ifndef Standard_EXPORT -# define Standard_EXPORT __declspec( dllexport ) -// For global variables : -# define Standard_EXPORTEXTERN __declspec( dllexport ) extern -# define Standard_EXPORTEXTERNC extern "C" __declspec( dllexport ) -# endif /* Standard_EXPORT */ - -# ifndef Standard_IMPORT -# define Standard_IMPORT __declspec( dllimport ) extern -# define Standard_IMPORTC extern "C" __declspec( dllimport ) -# endif /* Standard_IMPORT */ +# ifdef _WIN32 // We must be careful including windows.h: it is really poisonous stuff! // The most annoying are #defines of many identifiers that you could use in @@ -132,10 +116,30 @@ #define NOIME NOIME #endif +#endif + +# if defined(_WIN32) && !defined(HAVE_NO_DLL) + +//====================================================== +// Windows-specific definitions +//====================================================== + +# ifndef Standard_EXPORT +# define Standard_EXPORT __declspec( dllexport ) +// For global variables : +# define Standard_EXPORTEXTERN __declspec( dllexport ) extern +# define Standard_EXPORTEXTERNC extern "C" __declspec( dllexport ) +# endif /* Standard_EXPORT */ + +# ifndef Standard_IMPORT +# define Standard_IMPORT __declspec( dllimport ) extern +# define Standard_IMPORTC extern "C" __declspec( dllimport ) +# endif /* Standard_IMPORT */ + # else /* UNIX */ //====================================================== -// UNIX definitions +// UNIX / static library definitions //====================================================== # ifndef Standard_EXPORT