// ----------------------------------------------------------------------------
 
 static wxDataFormat dataFormatInvalid;
-const wxDataFormat& wxFormatInvalid = dataFormatInvalid;
+WXDLLEXPORT const wxDataFormat& wxFormatInvalid = dataFormatInvalid;
 
 // ============================================================================
 // implementation
 
 // If we are building with configure (defines __WX_SETUP_H__), 
 // we trust the zlib path is given as a -I option.
 #if defined(__WXMSW__) && !defined(__WX_SETUP_H__)
-   #include "..\zlib\zlib.h"
+   #include "../zlib/zlib.h"
 #else
    #include "zlib.h"
 #endif
 
 #include "wx/spinctrl.h"
 
 // this is where wxGetNumberFromUser() is declared
-#include "wx/generic/textdlgg.h"
+#include "wx/textdlgg.h"
 
 #if !wxUSE_SPINCTRL
     // wxTextCtrl will do instead of wxSpinCtrl if we don't have it
 
 
 // For some reason, with MSVC++ 1.5, WinMain isn't linked in properly
 // if in a separate file. So include it here to ensure it's linked.
-#if (defined(__VISUALC__) && !defined(__WIN32__)) || (defined(__GNUWIN32__) && !defined(__TWIN32__))
+#if (defined(__VISUALC__) && !defined(__WIN32__)) || (defined(__GNUWIN32__) && !defined(__TWIN32__) && !defined(WXMAKINGDLL))
 #include "main.cpp"
 #endif