include/basic/modsizeexceeded.hxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit a2dce7ceeeada0e57c49bc28d50132b375b72ab6 Author: Luboš Luňák <[email protected]> AuthorDate: Mon Oct 11 08:41:12 2021 +0200 Commit: Luboš Luňák <[email protected]> CommitDate: Thu Oct 14 14:28:18 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 <[email protected]> (cherry picked from commit bbe9bfee56ce395c5fa1c1173e9909925a3a6393) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123520 Tested-by: Jenkins CollaboraOffice <[email protected]> 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
