使用_GLIBCXX_USE_C99时未定义的strtold

时间:2013-10-21 16:34:49

标签: c++ gcc c++11 cygwin std

本周末我正在尝试使用C ++ 11,但在尝试使用std :: to_string()时遇到了问题。 gcc告诉我std :: to_string()不存在,所以我在basic_string.h中找到了to_string函数,发现它们都被宏包裹了

#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \
 && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF))

我发现定义_GLIBCXX_USE_C99的c ++ config.h中的行看到它被注释掉了,所以我启用该宏并再次尝试构建。现在std :: to_string()变为活动状态但我还有其他几个错误。

'__gnu_css::wcstold' has not been declared
'::wcstold' has not been declared
'std::wcstold' has not been declared
'strtold' is not a member of 'std'
'wcstold' is not a member of 'std'

修复此问题的任何线索?我在cygwin邮件列表上找到了一篇描述同样问题的帖子,但没有提供好的解决方案。

为了记录所有其他C ++ 11函数都运行良好,只是std :: to_string()让我感到悲伤。

0 个答案:

没有答案