Domanda

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.

È stato utile?

Soluzione

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

This solved it.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top