我已將項目轉換爲VS2010。它包含一個基於googletest的單元測試項目。當我用宏EXPECT_EQ
,我得到下面的連接錯誤:googletest和VS2010:無法使用EXPECT_EQ
LNK2019: unresolved external symbol "class testing::internal::String __cdecl testing::internal::StrStreamToString(class std::basic_stringstream,class std::allocator > *)" ([email protected]@[email protected]@YA? [email protected]@[email protected][email protected]@[email protected]@V? [email protected]@[email protected]@[email protected]@@Z) referenced in function "public: class testing::internal::String __thiscall testing::Message::GetString(void)const " (? [email protected]@[email protected]@[email protected]@[email protected])
當我使用EXPECT_TRUE
,一切工作正常。有人知道這個問題嗎?
謝謝
您能給出您的EXPECT_EQ語句的代碼示例嗎? – 2012-05-06 13:31:13