diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2021-10-11 08:41:12 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2021-10-11 11:31:05 +0200 |
commit | bbe9bfee56ce395c5fa1c1173e9909925a3a6393 (patch) | |
tree | bbb58ca588bc4fad639a5d45c3a62cb7a004ebc9 | |
parent | 0328bd0adeafafaa79501a1cf31557fd4c7a6c2a (diff) |
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.lunak@collabora.com>
-rw-r--r-- | include/basic/modsizeexceeded.hxx | 7 |
1 files changed, 7 insertions, 0 deletions
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 |