Download Google Test source
Compile GTest
- Open ./msvc/gtest.sln by Visual Studio 2012
- Properties -> C/C++ -> Preprocessor -> Preprocessor define: add _VARIADIC_MAX = 10
- Properties -> C/C++ -> Code Generation -> Runtime library: DLL(/MD) in release or DLL(/MDd) in debug
- Compile gtest and gtest_main projects
Output Library
- debug/gtestd.lib
- debug/gtest_maind.lib
- release/gtest.lib
- release/gtest_main.lib
Example
Reference