X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/27db95f05459cad75e705f15750bf4d7d7666713..ec6ac3eb94ee1b59a945b01bcb18090ec92afca7:/src/common/object.cpp diff --git a/src/common/object.cpp b/src/common/object.cpp index b3c4367ad7..8dad5efc0f 100644 --- a/src/common/object.cpp +++ b/src/common/object.cpp @@ -43,11 +43,22 @@ #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) +#endif wxClassInfo wxObject::sm_classwxObject( wxT("wxObject"), 0, 0, (int) sizeof(wxObject), (wxObjectConstructorFn) 0 ); +// restore optimizations +#if defined __VISUALC__ && __VISUALC__ >= 1300 + #pragma optimize("", on) +#endif + wxClassInfo* wxClassInfo::sm_first = NULL; wxHashTable* wxClassInfo::sm_classTable = NULL;