Download from http://code.google.com/p/googletest/
1. Open VS2008
2. Open gtest.sln under msvc->Build->Generate getestd.lib

3. Create a new solution for writing test codes
4. Right click project and select properties

5. Select General-> Use of MFC-> Use MFC in a Static Library

6. Select C/C++-> General-> Additional ..-> “..\gtest\include”

7. Select Linker->Input->Additional …->”..\gtestd.lib”

8. Add #include < gtest/gtest.h> into test codes
本文详细介绍如何在Visual Studio 2008中配置并使用Google Test框架。步骤包括从官方源下载,编译生成gtestd.lib库文件,创建新的解决方案编写测试代码,并设置必要的链接器选项及包含目录。
3756

被折叠的 条评论
为什么被折叠?



