I’d just like to point out that strictly speaking you don’t need Google Mock for the code you’ve shown, but only Google Test. They’ve been merged into one project now ( https:///google/googletest ), but they are separate entities. Your causes both gmock and gtest to compile and link to the code even though gmock doesn’t actually do anything. I modified my to link only to Google Test instead of Mock and it works. This way it doesn’t have to compile and link to the unnecessary gmock. I guess in the future I’d like it compile and link to both once I start using gmock functionality, but I prefer to keep them separate at this point just to have it clear in my head which functionality comes from gtest and which comes from gmock.