2

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*>'
4

1 に答える 1

2

GCC 3.2 は、Google Test が使用するコンストラクトをサポートするには古すぎるコンパイラです。C++ 03 標準よりも前のものです。これらのサンプルを新しいバージョンの GCC でビルドしてみてください。

于 2013-03-14T15:24:19.827 に答える