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