You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CMakeLists.txt for the unit tests specifies to link both with gmock and with gtest. When building them static, I got a duplicate symbol in some OSs.
But then I realize that if you link with gmock only, it works fine. So, is the gtest library really needed?
The text was updated successfully, but these errors were encountered:
Actually, I'm not sure of how gtest/gmock should be linked. I never used them before, and, honestly, I don't like how their code looks (it looks like a pretty untidy design, at least at first glance).
There are other alternatives like Catch which is also quite popular. I chose gtest since love it or not it's widely used and supported by a variety of IDEs (such as VSCode via extension, CLion, etc). But it is true that it's been one of the major sources of breaking the builds whenever a new version of a compiler is introduced.
The CMakeLists.txt for the unit tests specifies to link both with gmock and with gtest. When building them static, I got a duplicate symbol in some OSs.
But then I realize that if you link with gmock only, it works fine. So, is the gtest library really needed?
The text was updated successfully, but these errors were encountered: