I am using Google Test library(built on platform toolset v140 in visual studio 2015) in my vc++ project, which also builds in platform toolset v140 in visual studio 2015. Everything working fine till this point.
Now when I migrate my project to visual studio 2019(to platform toolset v142), but want to use same Google test library which was built on v140, I am getting below linking errors of google test library.
Error LNK2019 unresolved external symbol "public: __cdecl testing::Message::Message(void)" (??0Message@testing@@QEAA@XZ) referenced in function "private: virtual void __cdecl VideoProbeGoogleTest::BlobAutoDetector_BlobCreateGrayImageInRegion_Test::TestBody(void)" (?TestBody@BlobAutoDetector_BlobCreateGrayImageInRegion_Test@VideoProbeGoogleTest@@EEAAXXZ) WAI_VideoProbeBlobTest
Error LNK2019 unresolved external symbol "public: class std::basic_string,class std::allocator > __cdecl testing::Message::GetString(void)const " (?GetString@Message@testing@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) referenced in function "private: void __cdecl testing::AssertionResult::AppendMessage(class testing::Message const &)" (?AppendMessage@AssertionResult@testing@@AEAAXAEBVMessage@2@@Z))
But According to the Microsoft, they are giving binary compatibility between visual studio 2015, 2017 and 2019 versions. https://learn.microsoft.com/en-us/cpp/porting/binary-compat-2015-2017?view=vs-2019
Am I doing anything wrong here? why compatibility is not working in my case?