wangyu5 / googlemock

Automatically exported from code.google.com/p/googlemock
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

complie 1.7 with vs 2010 fail #164

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
when i complie gmock-1.7.0-rc1.zip with visual studio 2010,i get the error info:
1>------ Build started: Project: gmock, Configuration: Debug Win32 ------
1>  gmock.vcxproj -> E:\gmock-1.7.0\msvc\2010\Debug\gmock.lib
2>------ Build started: Project: gmock_main, Configuration: Debug Win32 ------
2>  gmock_main.vcxproj -> E:\gmock-1.7.0\msvc\2010\Debug\gmock_main.lib
3>------ Build started: Project: gmock_test, Configuration: Debug Win32 ------
3>  gmock_all_test.cc
3>E:\gmock-1.7.0\test/gmock-generated-function-mockers_test.cc(134): warning 
C4373: 'testing::gmock_generated_function_mockers_test::MockFoo::TakesConst': 
virtual function overrides 
'testing::gmock_generated_function_mockers_test::FooInterface::TakesConst', 
previous versions of the compiler did not override when parameters only 
differed by const/volatile qualifiers
3>          E:\gmock-1.7.0\test/gmock-generated-function-mockers_test.cc(91) : 
see declaration of 
'testing::gmock_generated_function_mockers_test::FooInterface::TakesConst'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2824): warning C4003: not enough 
actual parameters for macro 'max'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2825): warning C4003: not enough 
actual parameters for macro 'max'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2826): warning C4003: not enough 
actual parameters for macro 'max'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2827): warning C4003: not enough 
actual parameters for macro 'max'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2830): warning C4003: not enough 
actual parameters for macro 'max'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2831): warning C4003: not enough 
actual parameters for macro 'max'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2832): warning C4003: not enough 
actual parameters for macro 'max'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2833): warning C4003: not enough 
actual parameters for macro 'max'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2835): warning C4003: not enough 
actual parameters for macro 'max'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2836): warning C4003: not enough 
actual parameters for macro 'max'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2837): warning C4003: not enough 
actual parameters for macro 'max'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2840): warning C4003: not enough 
actual parameters for macro 'max'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2841): warning C4003: not enough 
actual parameters for macro 'max'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2842): warning C4003: not enough 
actual parameters for macro 'max'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2847): warning C4003: not enough 
actual parameters for macro 'max'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2848): warning C4003: not enough 
actual parameters for macro 'max'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2824): error C2589: '(' : illegal 
token on right side of '::'
3>          E:\gmock-1.7.0\test/gmock-matchers_test.cc(2794) : while compiling 
class template member function 'void 
testing::gmock_matchers_test::FloatingPointNearTest<RawType>::TestNearMatches(te
sting::internal::FloatingEqMatcher<FloatType> (__cdecl *)(RawType,RawType))'
3>          with
3>          [
3>              RawType=float,
3>              FloatType=float
3>          ]
3>          E:\gmock-1.7.0\test/gmock-matchers_test.cc(2932) : see reference to 
class template instantiation 
'testing::gmock_matchers_test::FloatingPointNearTest<RawType>' being compiled
3>          with
3>          [
3>              RawType=float
3>          ]
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2824): error C2143: syntax error : 
missing ')' before '::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2824): error C2198: 
'testing::internal::FloatingEqMatcher<FloatType> (__cdecl *)(RawType,RawType)' 
: too few arguments for call
3>          with
3>          [
3>              FloatType=float,
3>              RawType=float
3>          ]
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2825): error C2589: '(' : illegal 
token on right side of '::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2825): error C2059: syntax error : 
')'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2826): error C2589: '(' : illegal 
token on right side of '::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2826): error C2143: syntax error : 
missing ')' before '::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2826): error C2660: 
'testing::internal::MatcherBase<T>::Matches' : function does not take 0 
arguments
3>          with
3>          [
3>              T=float
3>          ]
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2826): error C2059: syntax error : 
')'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2826): error C2181: illegal else 
without matching if
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2826): error C2065: 'gtest_ar_' : 
undeclared identifier
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2826): error C2228: left of 
'.c_str' must have class/struct/union
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2827): error C2589: '(' : illegal 
token on right side of '::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2827): error C2059: syntax error : 
'::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2827): error C2181: illegal else 
without matching if
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2827): error C2065: 'gtest_ar_' : 
undeclared identifier
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2827): error C2228: left of 
'.c_str' must have class/struct/union
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2830): error C2589: '(' : illegal 
token on right side of '::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2830): error C2059: syntax error : 
'::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2831): error C2589: '(' : illegal 
token on right side of '::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2832): error C2589: '(' : illegal 
token on right side of '::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2832): error C2143: syntax error : 
missing ')' before '::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2832): error C2660: 
'testing::internal::MatcherBase<T>::Matches' : function does not take 0 
arguments
3>          with
3>          [
3>              T=float
3>          ]
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2832): error C2059: syntax error : 
')'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2832): error C2181: illegal else 
without matching if
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2832): error C2065: 'gtest_ar_' : 
undeclared identifier
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2832): error C2228: left of 
'.c_str' must have class/struct/union
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2833): error C2589: '(' : illegal 
token on right side of '::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2833): error C2059: syntax error : 
'::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2833): error C2181: illegal else 
without matching if
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2833): error C2065: 'gtest_ar_' : 
undeclared identifier
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2833): error C2228: left of 
'.c_str' must have class/struct/union
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2835): error C2589: '(' : illegal 
token on right side of '::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2835): error C2143: syntax error : 
missing ')' before '::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2835): error C2198: 
'testing::internal::FloatingEqMatcher<FloatType> (__cdecl *)(RawType,RawType)' 
: too few arguments for call
3>          with
3>          [
3>              FloatType=float,
3>              RawType=float
3>          ]
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2835): error C2059: syntax error : 
')'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2836): error C2589: '(' : illegal 
token on right side of '::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2836): error C2143: syntax error : 
missing ')' before '::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2836): error C2660: 
'testing::internal::MatcherBase<T>::Matches' : function does not take 0 
arguments
3>          with
3>          [
3>              T=float
3>          ]
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2836): error C2059: syntax error : 
')'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2836): error C2181: illegal else 
without matching if
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2836): error C2065: 'gtest_ar_' : 
undeclared identifier
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2836): error C2228: left of 
'.c_str' must have class/struct/union
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2837): error C2589: '(' : illegal 
token on right side of '::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2837): error C2059: syntax error : 
'::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2837): error C2181: illegal else 
without matching if
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2837): error C2065: 'gtest_ar_' : 
undeclared identifier
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2837): error C2228: left of 
'.c_str' must have class/struct/union
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2840): error C2589: '(' : illegal 
token on right side of '::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2840): error C2059: syntax error : 
'::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2841): error C2589: '(' : illegal 
token on right side of '::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2841): error C2143: syntax error : 
missing ')' before '::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2841): error C2660: 
'testing::internal::MatcherBase<T>::Matches' : function does not take 0 
arguments
3>          with
3>          [
3>              T=float
3>          ]
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2841): error C2059: syntax error : 
')'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2841): error C2181: illegal else 
without matching if
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2841): error C2065: 'gtest_ar_' : 
undeclared identifier
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2841): error C2228: left of 
'.c_str' must have class/struct/union
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2842): error C2589: '(' : illegal 
token on right side of '::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2842): error C2059: syntax error : 
'::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2842): error C2181: illegal else 
without matching if
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2842): error C2065: 'gtest_ar_' : 
undeclared identifier
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2842): error C2228: left of 
'.c_str' must have class/struct/union
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2847): error C2589: '(' : illegal 
token on right side of '::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2847): error C2143: syntax error : 
missing ')' before '::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2847): error C2198: 
'testing::internal::FloatingEqMatcher<FloatType> (__cdecl *)(RawType,RawType)' 
: too few arguments for call
3>          with
3>          [
3>              FloatType=float,
3>              RawType=float
3>          ]
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2847): error C2059: syntax error : 
')'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2848): error C2589: '(' : illegal 
token on right side of '::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2848): error C2059: syntax error : 
'::'
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2848): error C2181: illegal else 
without matching if
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2848): error C2065: 'gtest_ar_' : 
undeclared identifier
3>E:\gmock-1.7.0\test/gmock-matchers_test.cc(2848): error C2228: left of 
'.c_str' must have class/struct/union
========== Build: 2 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 anyone can tell me how to fix it?
sorry for my english is not my mother language.

Original issue reported on code.google.com by prop...@gmail.com on 18 Sep 2013 at 8:25

GoogleCodeExporter commented 9 years ago
the same as visual studio 2008

Original comment by prop...@gmail.com on 18 Sep 2013 at 8:28

GoogleCodeExporter commented 9 years ago
Fixed in trunk r451.

Original comment by w...@google.com on 18 Sep 2013 at 5:54