سؤال

I am writting a simple Google Test class with no fixture.

  • Is it mandatory to have a setUp() and a tearDown() for it ?

  • I have LNK errors when building. Error explicits unresolved external symbol "protected: virtual void_thiscall testing::Test::SetUp(void)" Where does this come from ?

LNK errors are LNK2019, LNK2001.

هل كانت مفيدة؟

المحلول

I had to add the gtest.lib inside the properties for the project, in Properties > Linker > Input > Additionnal Dependencies

This solved it.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top