include/basic/modsizeexceeded.hxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit bbe9bfee56ce395c5fa1c1173e9909925a3a6393 Author: Luboš Luňák <l.lu...@collabora.com> AuthorDate: Mon Oct 11 08:41:12 2021 +0200 Commit: Luboš Luňák <l.lu...@collabora.com> CommitDate: Mon Oct 11 11:31:05 2021 +0200 fix MSVC mergelibs build Linker complains about duplicate symbols for the template, seems to be a case of https://codesynthesis.com/~boris/blog/2010/01/18/dll-export-cxx-templates/ Change-Id: Iaffa3ba55edf4e54c62757c64d6b340b55a514cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123362 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lu...@collabora.com> diff --git a/include/basic/modsizeexceeded.hxx b/include/basic/modsizeexceeded.hxx index decaae9b07b3..7403b398e777 100644 --- a/include/basic/modsizeexceeded.hxx +++ b/include/basic/modsizeexceeded.hxx @@ -28,6 +28,13 @@ namespace com::sun::star::task { class XInteractionContinuation; } +#if defined(_MSC_VER) +// MSVC automatically applies dllexport to template instantiations if they are a base class +// of a dllexport class, and this template instantiation is a case of that. If we don't +// dllimport here, MSVC will complain about duplicate symbols in a mergelibs build. +template class __declspec(dllimport) cppu::WeakImplHelper< css::task::XInteractionRequest >; +#endif + class UNLESS_MERGELIBS(BASIC_DLLPUBLIC) ModuleSizeExceeded final : public cppu::WeakImplHelper< css::task::XInteractionRequest > { // C++ interface