Skip to content

[C++] unresolved external symbol from missing gtest mock link on Windows #47659

Description

@alinaliBQ

Describe the bug, including details regarding any error messages, version, and platform.

On Windows MSVC, when I try to build arrow-flight-testing, I see the following 12 errors:

11> Creating library C:/path/to/arrow/cpp/debug-build/debug/Debug/arrow_flight_testing.lib and object C:/path/to/arrow/cpp/debug-build/debug/Debug/arrow_flight_testing.exp
11>test_definitions.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl testing::internal::MatchMatrix::MatchMatrix(unsigned __int64,unsigned __int64)" (__imp_??0MatchMatrix@internal@testing@@QEAA@_K0@Z) referenced in function "private: class testing::internal::MatchMatrix __cdecl testing::internal::UnorderedElementsAreMatcherImpl<class std::vector<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &>::AnalyzeElements<class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > > >(class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > >,class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > >,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > *,class testing::MatchResultListener *)const " (??$AnalyzeElements@V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@std@@@std@@@std@@@?$UnorderedElementsAreMatcherImpl@AEBV?$vector@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@V?$allocator@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@@internal@testing@@AEBA?AVMatchMatrix@12@V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@std@@@std@@@std@@0PEAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@5@PEAVMatchResultListener@2@@Z)
11>test_definitions.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl testing::internal::MatchMatrix::SetEdge(unsigned __int64,unsigned __int64,bool)" (__imp_?SetEdge@MatchMatrix@internal@testing@@QEAAX_K0_N@Z) referenced in function "private: class testing::internal::MatchMatrix __cdecl testing::internal::UnorderedElementsAreMatcherImpl<class std::vector<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &>::AnalyzeElements<class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > > >(class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > >,class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > >,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > *,class testing::MatchResultListener *)const " (??$AnalyzeElements@V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@std@@@std@@@std@@@?$UnorderedElementsAreMatcherImpl@AEBV?$vector@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@V?$allocator@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@@internal@testing@@AEBA?AVMatchMatrix@12@V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@std@@@std@@@std@@0PEAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@5@PEAVMatchResultListener@2@@Z)
11>test_definitions.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl testing::internal::MatchMatrix::~MatchMatrix(void)" (__imp_??1MatchMatrix@internal@testing@@QEAA@XZ) referenced in function "private: class testing::internal::MatchMatrix __cdecl testing::internal::UnorderedElementsAreMatcherImpl<class std::vector<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &>::AnalyzeElements<class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > > >(class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > >,class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > >,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > *,class testing::MatchResultListener *)const " (??$AnalyzeElements@V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@std@@@std@@@std@@@?$UnorderedElementsAreMatcherImpl@AEBV?$vector@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@V?$allocator@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@@internal@testing@@AEBA?AVMatchMatrix@12@V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@std@@@std@@@std@@0PEAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@5@PEAVMatchResultListener@2@@Z)
11>test_definitions.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl testing::internal::MatchMatrix::MatchMatrix(class testing::internal::MatchMatrix &&)" (__imp_??0MatchMatrix@internal@testing@@QEAA@$$QEAV012@@Z) referenced in function "private: class testing::internal::MatchMatrix __cdecl testing::internal::UnorderedElementsAreMatcherImpl<class std::vector<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &>::AnalyzeElements<class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > > >(class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > >,class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > >,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > *,class testing::MatchResultListener *)const " (??$AnalyzeElements@V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@std@@@std@@@std@@@?$UnorderedElementsAreMatcherImpl@AEBV?$vector@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@V?$allocator@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@@internal@testing@@AEBA?AVMatchMatrix@12@V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@std@@@std@@@std@@0PEAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@5@PEAVMatchResultListener@2@@Z)
11>test_definitions.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: __cdecl testing::internal::UnorderedElementsAreMatcherImplBase::UnorderedElementsAreMatcherImplBase(enum testing::internal::UnorderedMatcherRequire::Flags)" (__imp_??0UnorderedElementsAreMatcherImplBase@internal@testing@@IEAA@W4Flags@UnorderedMatcherRequire@12@@Z) referenced in function "public: __cdecl testing::internal::UnorderedElementsAreMatcherImpl<class std::vector<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &>::UnorderedElementsAreMatcherImpl<class std::vector<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &><class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<struct std::pair<char const *,char const *> > > > >(enum testing::internal::UnorderedMatcherRequire::Flags,class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<struct std::pair<char const *,char const *> > > >,class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<struct std::pair<char const *,char const *> > > >)" (??$?0V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@U?$pair@PEBDPEBD@std@@@std@@@std@@@std@@@?$UnorderedElementsAreMatcherImpl@AEBV?$vector@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@V?$allocator@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@@internal@testing@@QEAA@W4Flags@UnorderedMatcherRequire@12@V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@U?$pair@PEBDPEBD@std@@@std@@@std@@@std@@1@Z)
11>test_definitions.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: void __cdecl testing::internal::UnorderedElementsAreMatcherImplBase::DescribeToImpl(class std::basic_ostream<char,struct std::char_traits<char> > *)const " (__imp_?DescribeToImpl@UnorderedElementsAreMatcherImplBase@internal@testing@@IEBAXPEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z) referenced in function "public: virtual void __cdecl testing::internal::UnorderedElementsAreMatcherImpl<class std::vector<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &>::DescribeTo(class std::basic_ostream<char,struct std::char_traits<char> > *)const " (?DescribeTo@?$UnorderedElementsAreMatcherImpl@AEBV?$vector@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@V?$allocator@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@@internal@testing@@UEBAXPEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z)
11>test_definitions.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: void __cdecl testing::internal::UnorderedElementsAreMatcherImplBase::DescribeNegationToImpl(class std::basic_ostream<char,struct std::char_traits<char> > *)const " (__imp_?DescribeNegationToImpl@UnorderedElementsAreMatcherImplBase@internal@testing@@IEBAXPEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z) referenced in function "public: virtual void __cdecl testing::internal::UnorderedElementsAreMatcherImpl<class std::vector<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &>::DescribeNegationTo(class std::basic_ostream<char,struct std::char_traits<char> > *)const " (?DescribeNegationTo@?$UnorderedElementsAreMatcherImpl@AEBV?$vector@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@V?$allocator@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@@internal@testing@@UEBAXPEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z)
11>test_definitions.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: bool __cdecl testing::internal::UnorderedElementsAreMatcherImplBase::VerifyMatchMatrix(class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > const &,class testing::internal::MatchMatrix const &,class testing::MatchResultListener *)const " (__imp_?VerifyMatchMatrix@UnorderedElementsAreMatcherImplBase@internal@testing@@IEBA_NAEBV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@AEBVMatchMatrix@23@PEAVMatchResultListener@3@@Z) referenced in function "public: virtual bool __cdecl testing::internal::UnorderedElementsAreMatcherImpl<class std::vector<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &>::MatchAndExplain(class std::vector<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &,class testing::MatchResultListener *)const " (?MatchAndExplain@?$UnorderedElementsAreMatcherImpl@AEBV?$vector@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@V?$allocator@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@@internal@testing@@UEBA_NAEBV?$vector@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@V?$allocator@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@PEAVMatchResultListener@3@@Z)
11>test_definitions.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: bool __cdecl testing::internal::UnorderedElementsAreMatcherImplBase::FindPairing(class testing::internal::MatchMatrix const &,class testing::MatchResultListener *)const " (__imp_?FindPairing@UnorderedElementsAreMatcherImplBase@internal@testing@@IEBA_NAEBVMatchMatrix@23@PEAVMatchResultListener@3@@Z) referenced in function "public: virtual bool __cdecl testing::internal::UnorderedElementsAreMatcherImpl<class std::vector<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &>::MatchAndExplain(class std::vector<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &,class testing::MatchResultListener *)const " (?MatchAndExplain@?$UnorderedElementsAreMatcherImpl@AEBV?$vector@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@V?$allocator@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@@internal@testing@@UEBA_NAEBV?$vector@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@V?$allocator@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@PEAVMatchResultListener@3@@Z)
11>test_definitions.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: class std::vector<class testing::MatcherDescriberInterface const *,class std::allocator<class testing::MatcherDescriberInterface const *> > & __cdecl testing::internal::UnorderedElementsAreMatcherImplBase::matcher_describers(void)" (__imp_?matcher_describers@UnorderedElementsAreMatcherImplBase@internal@testing@@IEAAAEAV?$vector@PEBVMatcherDescriberInterface@testing@@V?$allocator@PEBVMatcherDescriberInterface@testing@@@std@@@std@@XZ) referenced in function "public: __cdecl testing::internal::UnorderedElementsAreMatcherImpl<class std::vector<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &>::UnorderedElementsAreMatcherImpl<class std::vector<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &><class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<struct std::pair<char const *,char const *> > > > >(enum testing::internal::UnorderedMatcherRequire::Flags,class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<struct std::pair<char const *,char const *> > > >,class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<struct std::pair<char const *,char const *> > > >)" (??$?0V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@U?$pair@PEBDPEBD@std@@@std@@@std@@@std@@@?$UnorderedElementsAreMatcherImpl@AEBV?$vector@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@V?$allocator@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@@internal@testing@@QEAA@W4Flags@UnorderedMatcherRequire@12@V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@U?$pair@PEBDPEBD@std@@@std@@@std@@@std@@1@Z)
11>test_definitions.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl testing::internal::UnorderedElementsAreMatcherImplBase::~UnorderedElementsAreMatcherImplBase(void)" (__imp_??1UnorderedElementsAreMatcherImplBase@internal@testing@@QEAA@XZ) referenced in function "int `public: __cdecl testing::internal::UnorderedElementsAreMatcherImpl<class std::vector<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &>::UnorderedElementsAreMatcherImpl<class std::vector<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &><class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<struct std::pair<char const *,char const *> > > > >(enum internal::UnorderedElementsAreMatcherImpl<class std::vector<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &>::UnorderedMatcherRequire::Flags,class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<struct std::pair<char const *,char const *> > > >,class std::_Vector_const_iterator<class std::_Vector_val<struct std::_Simple_types<struct std::pair<char const *,char const *> > > >)'::`1'::dtor$3" (?dtor$3@?0???$?0V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@U?$pair@PEBDPEBD@std@@@std@@@std@@@std@@@?$UnorderedElementsAreMatcherImpl@AEBV?$vector@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@V?$allocator@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@@internal@testing@@QEAA@W4Flags@UnorderedMatcherRequire@12@V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@U?$pair@PEBDPEBD@std@@@std@@@std@@@std@@1@Z@4HA)
11>C:\path\to\arrow\cpp\debug-build\debug\Debug\arrow_flight_testing.dll : fatal error LNK1120: 11 unresolved externals
11>Done building project "arrow_flight_testing_shared.vcxproj" -- FAILED.

This errors occur because the compiler cannot find the internal implementation of some google test functions. I found that adding ARROW_GTEST_GMOCK to the linked libraries fixes this issue.

Component(s)

C++, FlightRPC

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions