0028983: Configuration - HAVE_NO_DLL causes compilation to fail on MSVC
authorThomas Krijnen <t.krijnen@gmail.com>
Thu, 10 Aug 2017 08:01:40 +0000 (10:01 +0200)
committerbugmaster <bugmaster@opencascade.com>
Thu, 10 Aug 2017 10:56:10 +0000 (13:56 +0300)
src/Standard/Standard_Macro.hxx

index a81da00d3a5a8ac6c3315ee487a2b68f5278de09..fd04320593a2bd65f3a8b187aba5b77eea1d96bb 100644 (file)
   #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 
 #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