-#define DECLARE_LOG_FUNCTION(level) \
-extern void WXDLLEXPORT wxLog##level(const wxChar *szFormat, ...)
-#define DECLARE_LOG_FUNCTION2(level, arg1) \
-extern void WXDLLEXPORT wxLog##level(arg1, const wxChar *szFormat, ...)
+#define DECLARE_LOG_FUNCTION(level) \
+extern void WXDLLIMPEXP_BASE wxVLog##level(const wxChar *szFormat, \
+ va_list argptr); \
+extern void WXDLLIMPEXP_BASE wxLog##level(const wxChar *szFormat, \
+ ...) ATTRIBUTE_PRINTF_1
+#define DECLARE_LOG_FUNCTION2_EXP(level, arg, expdecl) \
+extern void expdecl wxVLog##level(arg, const wxChar *szFormat, \
+ va_list argptr); \
+extern void expdecl wxLog##level(arg, const wxChar *szFormat, \
+ ...) ATTRIBUTE_PRINTF_2
+#define DECLARE_LOG_FUNCTION2(level, arg) \
+ DECLARE_LOG_FUNCTION2_EXP(level, arg, WXDLLIMPEXP_BASE)
+
+#else // !wxUSE_LOG
+
+// log functions do nothing at all
+#define DECLARE_LOG_FUNCTION(level) \
+inline void wxVLog##level(const wxChar *szFormat, \
+ va_list argptr) { } \
+inline void wxLog##level(const wxChar *szFormat, ...) { }
+#define DECLARE_LOG_FUNCTION2(level, arg) \
+inline void wxVLog##level(arg, const wxChar *szFormat, \
+ va_list argptr) {} \
+inline void wxLog##level(arg, const wxChar *szFormat, ...) { }
+
+// Empty Class to fake wxLogNull
+class WXDLLIMPEXP_BASE wxLogNull
+{
+public:
+ wxLogNull() { }
+};
+
+// Dummy macros to replace some functions.
+#define wxSysErrorCode() (unsigned long)0
+#define wxSysErrorMsg( X ) (const wxChar*)NULL
+
+// Fake symbolic trace masks... for those that are used frequently
+#define wxTRACE_OleCalls wxEmptyString // OLE interface calls