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-14 14:28:18 +0200 |
commit | a2dce7ceeeada0e57c49bc28d50132b375b72ab6 (patch) | |
tree | 24c4be57fb1ead47d5fff884e5e917229fce8d27 /include | |
parent | ef5029848dad369b3cfd3d6804304a7cbf8bcf58 (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>
(cherry picked from commit bbe9bfee56ce395c5fa1c1173e9909925a3a6393)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123520
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'include')
-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 |