Bluewave 0 Posted April 5, 2022 Hi, Did any one get the Google Test Framework working? I installed it with GetIt (Google Test 2021.09. I tried to include the Google Test Libs (gtest.lib, gtest_main.lib) I got this as an result: [ilink32 Error] Error: Unresolved external 'std::locale::~locale()' referenced from C:\USERS\DONALD\DOCUMENTS\EMBARCADERO\STUDIO\21.0\CATALOGREPOSITORY\GOOGLETEST-2021.09\CBUILDER\LIB\WIN32\RELEASE\GMOCK.LIB|gmock-all [ilink32 Error] Error: Unresolved external 'std::ios_base::_Init()' referenced from C:\USERS\DONALD\DOCUMENTS\EMBARCADERO\STUDIO\21.0\CATALOGREPOSITORY\GOOGLETEST-2021.09\CBUILDER\LIB\WIN32\RELEASE\GMOCK.LIB|gmock-all [ilink32 Error] Error: Unresolved external 'std::ios_base::getloc() const' referenced from C:\USERS\DONALD\DOCUMENTS\EMBARCADERO\STUDIO\21.0\CATALOGREPOSITORY\GOOGLETEST-2021.09\CBUILDER\LIB\WIN32\RELEASE\GMOCK.LIB|gmock-all [ilink32 Error] Error: Unresolved external 'std::ctype<char>::widen(char) const' referenced from C:\USERS\DONALD\DOCUMENTS\EMBARCADERO\STUDIO\21.0\CATALOGREPOSITORY\GOOGLETEST-2021.09\CBUILDER\LIB\WIN32\RELEASE\GMOCK.LIB|gmock-all [ilink32 Error] Error: Unresolved external 'std::ios_base::rdstate() const' referenced from C:\USERS\DONALD\DOCUMENTS\EMBARCADERO\STUDIO\21.0\CATALOGREPOSITORY\GOOGLETEST-2021.09\CBUILDER\LIB\WIN32\RELEASE\GMOCK.LIB|gmock-all [ilink32 Error] Error: Unresolved external 'std::ios_base::ios_base()' referenced from C:\USERS\DONALD\DOCUMENTS\EMBARCADERO\STUDIO\21.0\CATALOGREPOSITORY\GOOGLETEST-2021.09\CBUILDER\LIB\WIN32\RELEASE\GMOCK.LIB|gmock-all [ilink32 Error] Error: Unresolved external 'std::locale::locale()' referenced from C:\USERS\DONALD\DOCUMENTS\EMBARCADERO\STUDIO\21.0\CATALOGREPOSITORY\GOOGLETEST-2021.09\CBUILDER\LIB\WIN32\RELEASE\GMOCK.LIB|gmock-all [ilink32 Error] Error: Unresolved external 'std::ios_base::setf(std::_Iosb<int>::_Fmtflags, std::_Iosb<int>::_Fmtflags)' referenced from C:\USERS\DONALD\DOCUMENTS\EMBARCADERO\STUDIO\21.0\CATALOGREPOSITORY\GOOGLETEST-2021.09\CBUILDER\LIB\WIN32\RELEASE\GMOCK.LIB|gtest-all [ilink32 Error] Error: Unresolved external 'std::ios_base::setf(std::_Iosb<int>::_Fmtflags)' referenced from C:\USERS\DONALD\DOCUMENTS\EMBARCADERO\STUDIO\21.0\CATALOGREPOSITORY\GOOGLETEST-2021.09\CBUILDER\LIB\WIN32\RELEASE\GMOCK.LIB|gtest-all [ilink32 Error] Error: Unresolved external 'std::ios_base::good() const' referenced from C:\USERS\DONALD\DOCUMENTS\EMBARCADERO\STUDIO\21.0\CATALOGREPOSITORY\GOOGLETEST-2021.09\CBUILDER\LIB\WIN32\RELEASE\GMOCK.LIB|gmock-all [ilink32 Error] Error: Unresolved external 'std::ios_base::flags() const' referenced from C:\USERS\DONALD\DOCUMENTS\EMBARCADERO\STUDIO\21.0\CATALOGREPOSITORY\GOOGLETEST-2021.09\CBUILDER\LIB\WIN32\RELEASE\GMOCK.LIB|gmock-all [ilink32 Error] Error: Unresolved external 'std::ios_base::width() const' referenced from C:\USERS\DONALD\DOCUMENTS\EMBARCADERO\STUDIO\21.0\CATALOGREPOSITORY\GOOGLETEST-2021.09\CBUILDER\LIB\WIN32\RELEASE\GMOCK.LIB|gmock-all [ilink32 Error] Error: Unresolved external 'std::ios_base::width(long long)' referenced from C:\USERS\DONALD\DOCUMENTS\EMBARCADERO\STUDIO\21.0\CATALOGREPOSITORY\GOOGLETEST-2021.09\CBUILDER\LIB\WIN32\RELEASE\GMOCK.LIB|gmock-all [ilink32 Error] Error: Unresolved external '__Atomic_fetch_sub_4' referenced from C:\USERS\DONALD\DOCUMENTS\EMBARCADERO\STUDIO\21.0\CATALOGREPOSITORY\GOOGLETEST-2021.09\CBUILDER\LIB\WIN32\RELEASE\GMOCK.LIB|gtest-all [ilink32 Error] Error: Unresolved external '__Atomic_fetch_add_4' referenced from C:\USERS\DONALD\DOCUMENTS\EMBARCADERO\STUDIO\21.0\CATALOGREPOSITORY\GOOGLETEST-2021.09\CBUILDER\LIB\WIN32\RELEASE\GMOCK.LIB|gtest-all [ilink32 Error] Error: Unresolved external 'std::locale::id::id(unsigned int)' referenced from C:\USERS\DONALD\DOCUMENTS\EMBARCADERO\STUDIO\21.0\CATALOGREPOSITORY\GOOGLETEST-2021.09\CBUILDER\LIB\WIN32\RELEASE\GMOCK.LIB|sample8_unittest [ilink32 Error] Error: Unresolved external 'std::exception::exception()' referenced from C:\USERS\DONALD\DOCUMENTS\EMBARCADERO\STUDIO\21.0\CATALOGREPOSITORY\GOOGLETEST-2021.09\CBUILDER\LIB\WIN32\RELEASE\GMOCK.LIB|gtest-all [ilink32 Error] Error: Unresolved external 'std::codecvt<wchar_t, char, int>::codecvt<wchar_t, char, int>(unsigned int)' referenced from C:\USERS\DONALD\DOCUMENTS\EMBARCADERO\STUDIO\21.0\CATALOGREPOSITORY\GOOGLETEST-2021.09\CBUILDER\LIB\WIN32\RELEASE\GMOCK.LIB|gtest-all [ilink32 Error] Error: Unresolved external 'std::codecvt<wchar_t, char, int>::~codecvt<wchar_t, char, int>()' referenced from C:\USERS\DONALD\DOCUMENTS\EMBARCADERO\STUDIO\21.0\CATALOGREPOSITORY\GOOGLETEST-2021.09\CBUILDER\LIB\WIN32\RELEASE\GMOCK.LIB|gtest-all [ilink32 Error] Error: Unresolved external 'std::locale::_Locimp::_New_Locimp(std::locale::_Locimp&)' referenced from C:\USERS\DONALD\DOCUMENTS\EMBARCADERO\STUDIO\21.0\CATALOGREPOSITORY\GOOGLETEST-2021.09\CBUILDER\LIB\WIN32\RELEASE\GMOCK.LIB|gtest-all [ilink32 Error] Error: Unresolved external 'std::locale::id::operator unsigned int()' referenced from C:\USERS\DONALD\DOCUMENTS\EMBARCADERO\STUDIO\21.0\CATALOGREPOSITORY\GOOGLETEST-2021.09\CBUILDER\LIB\WIN32\RELEASE\GMOCK.LIB|gtest-all [ilink32 Error] Error: Unresolved external 'std::locale::operator =(std::locale&)' referenced from C:\USERS\DONALD\DOCUMENTS\EMBARCADERO\STUDIO\21.0\CATALOGREPOSITORY\GOOGLETEST-2021.09\CBUILDER\LIB\WIN32\RELEASE\GMOCK.LIB|gtest-all [ilink32 Error] Error: Unresolved external 'std::codecvt<wchar_t, char, int>::in(int&, const char *, const char *, const char *&, wchar_t *, wchar_t *, wchar_t *&) const' referenced from C:\USERS\DONALD\DOCUMENTS\EMBARCADERO\STUDIO\21.0\CATALOGREPOSITORY\GOOGLETEST-2021.09\CBUILDER\LIB\WIN32\RELEASE\GMOCK.LIB|gtest-all [ilink32 Error] Error: Unresolved external 'std::ios_base::flags(std::_Iosb<int>::_Fmtflags)' referenced from C:\USERS\DONALD\DOCUMENTS\EMBARCADERO\STUDIO\21.0\CATALOGREPOSITORY\GOOGLETEST-2021.09\CBUILDER\LIB\WIN32\RELEASE\GMOCK.LIB|gtest-all [ilink32 Error] Error: Unable to perform link It seems that the gtest libraries don't have all the code needed to run Google Test. Does someone know what I am doing wrong? Greetings, Don. Share this post Link to post
Roger Cigol 103 Posted April 6, 2022 Your first point may be to read the posting on Delphipraxis below. Around July 2021 there is a link to my blog about using google tests with 10.4.2. (and later a link to my blog about using it with 11.1). I did get it to work ok with 10.4.2 - be aware that the packages as downloaded by getit come with some of the projects set to clang32 and some set to clang64 (a mess - might have been fixed by now, but unlikely) so before you try to build all the packages downloaded by getit you need to manually set them all to clang32 or clang64 according to which you want to use. I have a licensed version of RAD Studio but I don't see any reason why you can't get it to work with 10.4.2 community edition. Be aware also that it never did work with 11.0 ! - but all is good with 11.1 It's always wise to search DelphiPraxis before posting as you may find (as in this case) that your question has already been answered. Also it's best to post C++ related questions in the C++ section of DelphiPraxis. Hope this helps.... 1 Share this post Link to post
Roger Cigol 103 Posted September 28, 2022 A very valuable posting has appeared on Stack Overflow regarding using Google Tests with Embarcadero C++ clang compilers. Thank you to T. Herzke for sharing this. More useful info on C++ google tests unit test Share this post Link to post