From c0f2f3801150ea9c6640f3fdced1d9120938f0d7 Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Sun, 21 Jul 2019 17:21:18 +0200 Subject: [PATCH] Fix linking to wxObjectEventFunctor with Clang on Windows Linking specific applications (sockets/baseserver, base test) resulted in the following error: undefined reference to `__imp__ZTV20wxObjectEventFunctor' Fix this by implementing the destructor inside the base library. --- include/wx/event.h | 2 ++ src/common/event.cpp | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/include/wx/event.h b/include/wx/event.h index de8e772d35..c196b72b27 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -213,6 +213,8 @@ private: class WXDLLIMPEXP_BASE wxObjectEventFunctor : public wxEventFunctor { public: + virtual ~wxObjectEventFunctor(); + wxObjectEventFunctor(wxObjectEventFunction method, wxEvtHandler *handler) : m_handler( handler ), m_method( method ) { } diff --git a/src/common/event.cpp b/src/common/event.cpp index 7d269005ba..0e5a62ad3e 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -360,6 +360,14 @@ wxEventFunctor::~wxEventFunctor() { } +// ---------------------------------------------------------------------------- +// wxObjectEventFunctor +// ---------------------------------------------------------------------------- + +wxObjectEventFunctor::~wxObjectEventFunctor() +{ +} + // ---------------------------------------------------------------------------- // wxEvent // ----------------------------------------------------------------------------