typeinfo for testing::NiceMock<>: error: undefined reference to 'typeinfo code example Example: undefined reference to `typeinfo virtual void foo() =0; //add = 0