- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我已经为 Solaris 8 sparc 构建了 gcc 4.6.1。我正在编译一些使用 boost::lexical_cast (boost 1.48) 的代码,但出现此错误:
boost/math/special_functions/sign.hpp: In function 'int boost::math::detail::signbit_impl(T, const boost::math::detail::native_tag&)'
error: 'signbit' is not a member of 'std'
(对于 fpclassify、isfinite、isnormal、isinf、isnan 也有类似的错误)
我查看了 cmath header ,它根据是否定义了 _GLIBCXX_USE_C99_MATH 有条件地定义了 std::signbit。我运行了 cpp -dM,发现 _GLIBCXX_USE_C99_MATH 未定义。有没有办法启用 C99 支持?我必须重建 libc 还是这个平台太旧了?我不在我的元素范围内,所以任何有关如何使这项工作正常进行的指导都会很棒。
最佳答案
您的平台 C 库可能太旧,无法支持 C99 FP 库添加。
来自Sun Studio 12 User's Guide :
Note - Though the compiler defaults to supporting the features of C99 listed below, standard headers provided by the Solaris software in
/usr/include
do not yet conform with the 1999 ISO/IEC C standard. If error messages are encountered, try using-xc99=none
to obtain the 1990 ISO/IEC C standard behavior for these headers.
关于c++ - 如何在 Solaris 8 SPARC 上启用 _GLIBCXX_USE_C99?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10391506/
我是一名优秀的程序员,十分优秀!