From 48276300668bedc1b7fafd5eccc80caf0b59cc6c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 3 Jul 2003 16:43:16 +0000 Subject: [PATCH] workaround BCC bug resulting in E2233 when building the DLL git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21610 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/event.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/wx/event.h b/include/wx/event.h index 05311f7311..da5a1fcc17 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -2231,11 +2231,14 @@ typedef void (wxEvtHandler::*wxMouseCaptureChangedEventFunction)(wxMouseCaptureC static const wxEventTable sm_eventTable; \ virtual const wxEventTable* GetEventTable() const; +// N.B.: when building DLL with Borland C++ 5.5 compiler, you must initialize +// sm_eventTable before using it in GetEventTable() or the compiler gives +// E2233 (see http://groups.google.com/groups?selm=397dcc8a%241_2%40dnews) #define BEGIN_EVENT_TABLE(theClass, baseClass) \ - const wxEventTable *theClass::GetEventTable() const \ - { return &theClass::sm_eventTable; } \ const wxEventTable theClass::sm_eventTable = \ { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \ + const wxEventTable *theClass::GetEventTable() const \ + { return &theClass::sm_eventTable; } \ const wxEventTableEntry theClass::sm_eventTableEntries[] = { \ #define END_EVENT_TABLE() DECLARE_EVENT_TABLE_ENTRY( wxEVT_NULL, 0, 0, 0, 0 ) }; -- 2.45.2