summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-03-20 16:02:19 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-03-20 19:16:26 +0100
commit81164d233eef91f5f76e79361688fbb67dc096ff (patch)
treefee97103ae44623708004124fb6ecff0116118ae /connectivity
parentada297f24bb3aec806d084ecd92234646098eda2 (diff)
MSVC hack to avoid multiply defined symbols
...as reported (at least with clang-cl and --disable-pch) now, apparently after e5230535877e30c3b874495e8794faa3a42d8017 "simplify ORefVector code": > [build LNK] Library/filelo.dll > idbtools.lib(dbtoolslo.dll) : error LNK2005: "public: long const & __cdecl std::vector<long,class std::allocator<long> >::operator[](unsigned __int64)const " (??A?$vector@JV?$allocator@J@std@@@std@@QEBAAEBJ_K@Z) already defined in fanalyzer.o > idbtools.lib(dbtoolslo.dll) : error LNK2005: "public: unsigned __int64 __cdecl std::vector<long,class std::allocator<long> >::size(void)const " (?size@?$vector@JV?$allocator@J@std@@@std@@QEBA_KXZ) already defined in fanalyzer.o > Creating library C:/lo-clang/core/workdir/LinkTarget/Library/ifile.lib and object C:/lo-clang/core/workdir/LinkTarget/Library/ifile.exp > C:\lo-clang\core\instdir\program\filelo.dll : fatal error LNK1169: one or more multiply defined symbols found (The fix strategy is the same as in e.g. 177f5c2e505b7978fc232a891577a448e49b290d "Proper fix for multiply defined SfxEnumItem<sal_uInt16> with MSVC".) Change-Id: Ie30fb21471e5cbe492486e3f0b76d50f67686253 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90803 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/inc/TSortIndex.hxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/connectivity/source/inc/TSortIndex.hxx b/connectivity/source/inc/TSortIndex.hxx
index 8d12cdd11d81..c0354316efd9 100644
--- a/connectivity/source/inc/TSortIndex.hxx
+++ b/connectivity/source/inc/TSortIndex.hxx
@@ -89,17 +89,19 @@ namespace connectivity
};
+ // MSVC hack to avoid multiply defined std::vector-related symbols:
+ class OKeySet_Base: public ORefVector<sal_Int32> {};
+
/**
The class OKeySet is a refcountable vector which also has a state.
This state gives information about if the keyset is fixed.
*/
- class OOO_DLLPUBLIC_DBTOOLS OKeySet : public ORefVector<sal_Int32>
+ class OOO_DLLPUBLIC_DBTOOLS OKeySet : public OKeySet_Base
{
bool m_bFrozen;
public:
OKeySet()
- : ORefVector<sal_Int32>()
- , m_bFrozen(false){}
+ : m_bFrozen(false){}
bool isFrozen() const { return m_bFrozen; }
void setFrozen() { m_bFrozen = true; }