What's the difference between gtest.lib and gtest_main.lib?
问题 Google's C++ Test Framework has two output libraries: one is gtest.lib and the other one is gtest_main.lib. According to Nik Reiman's answer on how to setup gtest with Visual Studio, we should link to gtest_main.lib but I'm linking to gtest.lib and the sample test cases that I have are running fine. What's the difference between the two libraries and does it matter which one I link to? 回答1: the only reasonable difference is that gtest_main.lib provides a default implementation of a test