Has anyone successfully built gmock and gtest in Visual Studio 2010? I’ve tried with version 1.5.0, but I only get incomprehensible compilation errors.
Has anyone successfully built gmock and gtest in Visual Studio 2010? I’ve tried with
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I found this thread in google groups about issues found when building gmock-1.5.0 under VS2010. Following the thread, I’ve created a short readme file, which worked for me, so here it is:
Perform the following changes to sources according to the thread:
in project gmock –> Private Header Files –> gmock-internal-utils.h:
char Helper(To);static char (&Helper(...))[2]; // NOLINT#ifdef..#endifsection with:static const bool value = std::is_convertible<From, To>::value;in project gmock_test –> Source Files –> gmock-printers_test.cc, line 848:
perform an explicit casting of the NULL argument to
void*, otherwise VS will automatically regard it is a null int. The resulting line should look like this:t10(false, 'a', 3, 4, 5, 1.5F, -2.5, str, static_cast<void*>(NULL), "10");Hope this helps,
Boaz
VS2010 compiler warnings from step 5 (see remarks at the end):
Remarks regarding warnings: