Dylan_lee
Dylan_lee

Reputation: 21

gtest :compile error

When I compile gtest samples on Redhat OS(gcc version is 3.2.2),it throw the error as below,howere it compile on Ubuntu it's OK.Pleae help me. Error or Warning:

../include/gtest/internal/gtest-internal.h: In instantiation of `testing::internal::ImplicitlyConvertible<const void*, const void*>':
../include/gtest/gtest-printers.h:314:   instantiated from `void testing::internal::DefaultPrintTo(char, testing::internal::bool_constant<true>, T*, std::ostream*) [with T = const void]'
../include/gtest/gtest-printers.h:376:   instantiated from `void testing::internal::PrintTo(const T&, std::ostream*) [with T = const void*]'
../include/gtest/gtest-printers.h:416:   instantiated from here
../include/gtest/internal/gtest-internal.h:890: no method `
   testing::internal::ImplicitlyConvertible<const void*, const void*>::MakeFrom
   '
../include/gtest/internal/gtest-internal.h:890: invalid use of undefined type `
   class testing::internal::ImplicitlyConvertible<const void*, const void*>'
../include/gtest/internal/gtest-internal.h:847: declaration of `class 
   testing::internal::ImplicitlyConvertible<const void*, const void*>'

Upvotes: 2

Views: 629

Answers (1)

VladLosev
VladLosev

Reputation: 7736

GCC 3.2 is a compiler that's simply too old to support constructs that Google Test uses - it even predates C++ 03 standard. Try building those samples with a newer version of GCC.

Upvotes: 2

Related Questions