From 664b8c153f6c4297b5acbd48c299637f417f3c4a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 3 Nov 2018 23:14:56 +0100 Subject: [PATCH] Don't export sorted dynamic arrays from the shared library This shouldn't be necessary and doing it seems to result in duplicate symbol errors when using MSVC under some not completely elucidated circumstances. See https://github.com/utelle/wxpdfdoc/pull/48 Closes https://github.com/wxWidgets/wxWidgets/pull/1013 --- include/wx/dynarray.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/wx/dynarray.h b/include/wx/dynarray.h index 84a65cbce6..a8684e7999 100644 --- a/include/wx/dynarray.h +++ b/include/wx/dynarray.h @@ -215,9 +215,11 @@ public: // cannot handle types with size greater than pointer because of sorting // ---------------------------------------------------------------------------- -#define _WX_DEFINE_SORTED_TYPEARRAY_2(T, name, base, defcomp, classexp) \ +// Note that "classdecl" here is intentionally not used because this class has +// only inline methods and so never needs to be exported from a DLL. +#define _WX_DEFINE_SORTED_TYPEARRAY_2(T, name, base, defcomp, classdecl) \ typedef wxBaseSortedArray wxBaseSortedArrayFor##name; \ - classexp name : public wxBaseSortedArrayFor##name \ + class name : public wxBaseSortedArrayFor##name \ { \ public: \ name(wxBaseSortedArrayFor##name::SCMPFUNC fn defcomp) \