-#if WXDEBUG || USE_DEBUG_CONTEXT
- // for wxObject::Dump
- #include <iostream.h>
-#endif
-
-#if !USE_SHARED_LIBRARY
-wxClassInfo wxObject::classwxObject((char *) "wxObject", (char *) NULL, (char *) NULL, (int ) sizeof(wxObject), (wxObjectConstructorFn) NULL);
-wxClassInfo *wxClassInfo::first = (wxClassInfo *) NULL;
-wxHashTable wxClassInfo::classTable(wxKEY_STRING);
+#if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT
+ // for wxObject::Dump
+ #include "wx/ioswrap.h"
+
+ #if defined(__VISAGECPP__)
+ #define DEBUG_PRINTF(NAME) { static int raz=0; \
+ printf( #NAME " %i\n",raz); fflush(stdout); raz++; }
+ #else
+ #define DEBUG_PRINTF(NAME)
+ #endif
+#endif // __WXDEBUG__ || wxUSE_DEBUG_CONTEXT
+
+// we must disable optimizations for VC.NET because otherwise its too eager
+// linker discards wxClassInfo objects in release build thus breaking many,
+// many things
+#if defined __VISUALC__ && __VISUALC__ >= 1300
+ #pragma optimize("", off)