2012-04-30 77 views
4

我已经为Solaris 8 sparc构建了gcc 4.6.1。我编译使用的boost :: lexical_cast的(提高1.48)一些代码,我得到这个错误:如何在Solaris 8 SPARC上启用_GLIBCXX_USE_C99?

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头文件中,它根据是否定义_GLIBCXX_USE_C99_MATH来有条件地定义std :: signbit。我运行cpp -dM,发现_GLIBCXX_USE_C99_MATH没有定义。有没有办法启用C99支持?我必须重建libc还是这个平台太老了?我超出了我的想法,所以任何有关如何使这项工作的指导都会很棒。

+0

的Solaris 8发布于2000年2月,现在是过去的支持生命的尽头。对今天的任何事来说都太旧了。 – alanc

回答

1

您的平台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.

相关问题