Fix link when using wxSimplebook both directly and indirectly

This resulted in its base class wxNavigationEnabled<wxBookCtrlBase>
being instantiated both in the application itself (when using it
directly) and inside the wx DLLs (when using another class using the
same base class, but defined in the DLL, such as wxAuiNotebook) and gave
linking errors.

Work around this by explicitly defining wxCompositeBookCtrlBase,
corresponding to this base class, ourselves and export it from the DLL
so that it's the single instance which is always used.

Closes #22805.
This commit is contained in:
Vadim Zeitlin 2023-01-29 15:23:03 +00:00
parent b91be88c0b
commit dbbf509e18
14 changed files with 64 additions and 23 deletions

View file

@ -23,8 +23,7 @@
#include "wx/aui/tabart.h"
#include "wx/aui/framemanager.h"
#include "wx/bookctrl.h"
#include "wx/containr.h"
#include "wx/compositebookctrl.h"
class wxAuiNotebook;
@ -244,7 +243,7 @@ protected:
class WXDLLIMPEXP_AUI wxAuiNotebook : public wxNavigationEnabled<wxBookCtrlBase>
class WXDLLIMPEXP_AUI wxAuiNotebook : public wxCompositeBookCtrlBase
{
public: