首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >gtest :编译错误

gtest :编译错误
EN

Stack Overflow用户
提问于 2013-03-14 10:50:24
回答 1查看 523关注 0票数 2

当我在Redhat OS(gcc版本是3.2.2)上编译gtest示例时,它抛出了如下错误,然而它在Ubuntu上编译它的OK.Pleae帮助我。错误或警告:

代码语言:javascript
复制
../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*>'
EN

回答 1

Stack Overflow用户

发布于 2013-03-14 23:24:20

GCC 3.2是一个编译器,它太旧了,无法支持谷歌测试使用的构造--它甚至早于C++ 03标准。尝试使用较新版本的GCC构建这些示例。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15400320

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档