MingW 上更新的 G++ 收到大量错误消息

2022-01-23 00:00:00 windows g++ mingw c++

我在 Windows 10 上使用 MinGW,最近使用 mingw-get updatemingw-get upgrade 更新了我的 g++.即使在完全重新安装 MinGW 之后,也会发生此错误.谷歌搜索没有找到任何远程相关的东西.

I'm on Windows 10 with MinGW, and recently updated my g++, using mingw-get update and mingw-get upgrade. This error occurred, even after total MinGW reinstall. No Google searches bring up anything remotely related.

我尝试编译

#include <iostream>
int main(){}

失败的原因如下:

In file included from c:mingwincludewchar.h:208:0,
                 from c:mingwlibgccmingw324.9.3includec++cwchar:44,
                 from c:mingwlibgccmingw324.9.3includec++itspostypes.h:40,
                 from c:mingwlibgccmingw324.9.3includec++iosfwd:40,
                 from c:mingwlibgccmingw324.9.3includec++ios:38,
                 from c:mingwlibgccmingw324.9.3includec++ostream:38,
                 from c:mingwlibgccmingw324.9.3includec++iostream:39,
                 from ariprog.cpp:8:
c:mingwincludesys/stat.h:173:14: error: '_dev_t' does not name a type
 struct _stat __struct_stat_defined( _off_t, time_t );
              ^
c:mingwincludesys/stat.h:173:14: error: '_ino_t' does not name a type
 struct _stat __struct_stat_defined( _off_t, time_t );
              ^
c:mingwincludesys/stat.h:173:14: error: '_mode_t' does not name a type
 struct _stat __struct_stat_defined( _off_t, time_t );
              ^
c:mingwincludesys/stat.h:173:14: error: '_dev_t' does not name a type
 struct _stat __struct_stat_defined( _off_t, time_t );
              ^
c:mingwincludesys/stat.h:173:14: error: '_off_t' does not name a type
 struct _stat __struct_stat_defined( _off_t, time_t );
              ^
c:mingwincludesys/stat.h:173:14: error: 'time_t' does not name a type
 struct _stat __struct_stat_defined( _off_t, time_t );
              ^
c:mingwincludesys/stat.h:173:14: error: 'time_t' does not name a type
 struct _stat __struct_stat_defined( _off_t, time_t );
              ^
c:mingwincludesys/stat.h:173:14: error: 'time_t' does not name a type
 struct _stat __struct_stat_defined( _off_t, time_t );
              ^
c:mingwincludesys/stat.h:180:13: error: '_dev_t' does not name a type
 struct stat __struct_stat_defined( _off_t, time_t );
             ^
c:mingwincludesys/stat.h:180:13: error: '_ino_t' does not name a type
 struct stat __struct_stat_defined( _off_t, time_t );
             ^
c:mingwincludesys/stat.h:180:13: error: '_mode_t' does not name a type
 struct stat __struct_stat_defined( _off_t, time_t );
             ^
c:mingwincludesys/stat.h:180:13: error: '_dev_t' does not name a type
 struct stat __struct_stat_defined( _off_t, time_t );
             ^
c:mingwincludesys/stat.h:180:13: error: '_off_t' does not name a type
 struct stat __struct_stat_defined( _off_t, time_t );
             ^
c:mingwincludesys/stat.h:180:13: error: 'time_t' does not name a type
 struct stat __struct_stat_defined( _off_t, time_t );
             ^
c:mingwincludesys/stat.h:180:13: error: 'time_t' does not name a type
 struct stat __struct_stat_defined( _off_t, time_t );
             ^
c:mingwincludesys/stat.h:180:13: error: 'time_t' does not name a type
 struct stat __struct_stat_defined( _off_t, time_t );
             ^
c:mingwincludesys/stat.h:188:17: error: '_dev_t' does not name a type
 struct _stati64 __struct_stat_defined( __off64_t, time_t );
                 ^
c:mingwincludesys/stat.h:188:17: error: '_ino_t' does not name a type
 struct _stati64 __struct_stat_defined( __off64_t, time_t );
                 ^
c:mingwincludesys/stat.h:188:17: error: '_mode_t' does not name a type
 struct _stati64 __struct_stat_defined( __off64_t, time_t );
                 ^
c:mingwincludesys/stat.h:188:17: error: '_dev_t' does not name a type
 struct _stati64 __struct_stat_defined( __off64_t, time_t );
                 ^
c:mingwincludesys/stat.h:188:17: error: '__off64_t' does not name a type
 struct _stati64 __struct_stat_defined( __off64_t, time_t );
                 ^
c:mingwincludesys/stat.h:188:17: error: 'time_t' does not name a type
 struct _stati64 __struct_stat_defined( __off64_t, time_t );
                 ^
c:mingwincludesys/stat.h:188:17: error: 'time_t' does not name a type
 struct _stati64 __struct_stat_defined( __off64_t, time_t );
                 ^
c:mingwincludesys/stat.h:188:17: error: 'time_t' does not name a type
 struct _stati64 __struct_stat_defined( __off64_t, time_t );
                 ^
c:mingwincludesys/stat.h:195:17: error: '_dev_t' does not name a type
 struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
                 ^
c:mingwincludesys/stat.h:195:17: error: '_ino_t' does not name a type
 struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
                 ^
c:mingwincludesys/stat.h:195:17: error: '_mode_t' does not name a type
 struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
                 ^
c:mingwincludesys/stat.h:195:17: error: '_dev_t' does not name a type
 struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
                 ^
c:mingwincludesys/stat.h:195:17: error: '__off64_t' does not name a type
 struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
                 ^
c:mingwincludesys/stat.h:195:17: error: '__time64_t' does not name a type
 struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
                 ^
c:mingwincludesys/stat.h:195:17: error: '__time64_t' does not name a type
 struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
                 ^
c:mingwincludesys/stat.h:195:17: error: '__time64_t' does not name a type
 struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
                 ^
In file included from c:mingwincludewchar.h:233:0,
                 from c:mingwlibgccmingw324.9.3includec++cwchar:44,
                 from c:mingwlibgccmingw324.9.3includec++itspostypes.h:40,
                 from c:mingwlibgccmingw324.9.3includec++iosfwd:40,
                 from c:mingwlibgccmingw324.9.3includec++ios:38,
                 from c:mingwlibgccmingw324.9.3includec++ostream:38,
                 from c:mingwlibgccmingw324.9.3includec++iostream:39,
                 from ariprog.cpp:8:
c:mingwincludeio.h:335:21: error: 'time_t' does not name a type
 struct _wfinddata_t __struct_finddata_t (time_t, _fsize_t);
                     ^
c:mingwincludeio.h:335:21: error: 'time_t' does not name a type
 struct _wfinddata_t __struct_finddata_t (time_t, _fsize_t);
                     ^
c:mingwincludeio.h:335:21: error: 'time_t' does not name a type
 struct _wfinddata_t __struct_finddata_t (time_t, _fsize_t);
                     ^
c:mingwincludeio.h:336:24: error: 'time_t' does not name a type
 struct _wfinddatai64_t __struct_finddata_t (time_t, __int64);
                        ^
c:mingwincludeio.h:336:24: error: 'time_t' does not name a type
 struct _wfinddatai64_t __struct_finddata_t (time_t, __int64);
                        ^
c:mingwincludeio.h:336:24: error: 'time_t' does not name a type
 struct _wfinddatai64_t __struct_finddata_t (time_t, __int64);
                        ^
c:mingwincludeio.h:362:24: error: '__time64_t' does not name a type
 struct __wfinddata64_t __struct_finddata_t (__time64_t, __int64);
                        ^
c:mingwincludeio.h:362:24: error: '__time64_t' does not name a type
 struct __wfinddata64_t __struct_finddata_t (__time64_t, __int64);
                        ^
c:mingwincludeio.h:362:24: error: '__time64_t' does not name a type
 struct __wfinddata64_t __struct_finddata_t (__time64_t, __int64);
                        ^
In file included from c:mingwlibgccmingw324.9.3includec++itspostypes.h:40:0,
                 from c:mingwlibgccmingw324.9.3includec++iosfwd:40,
                 from c:mingwlibgccmingw324.9.3includec++ios:38,
                 from c:mingwlibgccmingw324.9.3includec++ostream:38,
                 from c:mingwlibgccmingw324.9.3includec++iostream:39,
                 from ariprog.cpp:8:
c:mingwlibgccmingw324.9.3includec++cwchar:146:11: error: '::fwide' has not been declared
   using ::fwide;
           ^
c:mingwlibgccmingw324.9.3includec++cwchar:153:11: error: '::mbsinit' has not been declared
   using ::mbsinit;
           ^
c:mingwlibgccmingw324.9.3includec++cwchar:164:11: error: '::vfwscanf' has not been declared
   using ::vfwscanf;
           ^
c:mingwlibgccmingw324.9.3includec++cwchar:170:11: error: '::vswscanf' has not been declared
   using ::vswscanf;
           ^
c:mingwlibgccmingw324.9.3includec++cwchar:174:11: error: '::vwscanf' has not been declared
   using ::vwscanf;
           ^
c:mingwlibgccmingw324.9.3includec++cwchar:191:11: error: '::wcstof' has not been declared
   using ::wcstof;
           ^
c:mingwlibgccmingw324.9.3includec++cwchar:198:11: error: '::wmemcmp' has not been declared
   using ::wmemcmp;
           ^
c:mingwlibgccmingw324.9.3includec++cwchar:199:11: error: '::wmemcpy' has not been declared
   using ::wmemcpy;
           ^
c:mingwlibgccmingw324.9.3includec++cwchar:200:11: error: '::wmemmove' has not been declared
   using ::wmemmove;
           ^
c:mingwlibgccmingw324.9.3includec++cwchar:201:11: error: '::wmemset' has not been declared
   using ::wmemset;
           ^
c:mingwlibgccmingw324.9.3includec++cwchar:208:11: error: '::wmemchr' has not been declared
   using ::wmemchr;
           ^
c:mingwlibgccmingw324.9.3includec++cwchar: In function 'wchar_t* std::wmemchr(wchar_t*, wchar_t, std::size_t)':
c:mingwlibgccmingw324.9.3includec++cwchar:229:61: error: invalid conversion from 'const wchar_t*' to 'wchar_t*' [-fpermissive]
   { return wmemchr(const_cast<const wchar_t*>(__p), __c, __n); }
                                                             ^
c:mingwlibgccmingw324.9.3includec++cwchar:228:3: note: initializing argument 1 of 'wchar_t* std::wmemchr(wchar_t*, wchar_t, std::size_t)'
   wmemchr(wchar_t* __p, wchar_t __c, size_t __n)
   ^
c:mingwlibgccmingw324.9.3includec++cwchar: At global scope:
c:mingwlibgccmingw324.9.3includec++cwchar:248:11: error: '::wcstold' has not been declared
   using ::wcstold;
           ^
c:mingwlibgccmingw324.9.3includec++cwchar:257:11: error: '::wcstoll' has not been declared
   using ::wcstoll;
           ^
c:mingwlibgccmingw324.9.3includec++cwchar:258:11: error: '::wcstoull' has not been declared
   using ::wcstoull;
           ^
c:mingwlibgccmingw324.9.3includec++cwchar:264:22: error: '__gnu_cxx::wcstold' has not been declared
   using ::__gnu_cxx::wcstold;
                      ^
c:mingwlibgccmingw324.9.3includec++cwchar:265:22: error: '__gnu_cxx::wcstoll' has not been declared
   using ::__gnu_cxx::wcstoll;
                      ^
c:mingwlibgccmingw324.9.3includec++cwchar:266:22: error: '__gnu_cxx::wcstoull' has not been declared
   using ::__gnu_cxx::wcstoull;
                      ^
c:mingwlibgccmingw324.9.3includec++cwchar:280:14: error: 'std::wcstof' has not been declared
   using std::wcstof;
              ^
c:mingwlibgccmingw324.9.3includec++cwchar:283:14: error: 'std::vfwscanf' has not been declared
   using std::vfwscanf;
              ^
c:mingwlibgccmingw324.9.3includec++cwchar:286:14: error: 'std::vswscanf' has not been declared
   using std::vswscanf;
              ^
c:mingwlibgccmingw324.9.3includec++cwchar:289:14: error: 'std::vwscanf' has not been declared
   using std::vwscanf;
              ^
c:mingwlibgccmingw324.9.3includec++cwchar:293:14: error: 'std::wcstold' has not been declared
   using std::wcstold;
              ^
c:mingwlibgccmingw324.9.3includec++cwchar:294:14: error: 'std::wcstoll' has not been declared
   using std::wcstoll;
              ^
c:mingwlibgccmingw324.9.3includec++cwchar:295:14: error: 'std::wcstoull' has not been declared
   using std::wcstoull;
              ^
In file included from c:mingwlibgccmingw324.9.3includec++ios:40:0,
                 from c:mingwlibgccmingw324.9.3includec++ostream:38,
                 from c:mingwlibgccmingw324.9.3includec++iostream:39,
                 from ariprog.cpp:8:
c:mingwlibgccmingw324.9.3includec++itschar_traits.h: In static member function 'static int std::char_traits<wchar_t>::compare(const char_type*, const char_type*, std::size_t)':
c:mingwlibgccmingw324.9.3includec++itschar_traits.h:330:39: error: 'wmemcmp' was not declared in this scope
       { return wmemcmp(__s1, __s2, __n); }
                                       ^
c:mingwlibgccmingw324.9.3includec++itschar_traits.h: In static member function 'static const char_type* std::char_traits<wchar_t>::find(const char_type*, std::size_t, const char_type&)':
c:mingwlibgccmingw324.9.3includec++itschar_traits.h:338:37: error: invalid conversion from 'const char_type* {aka const wchar_t*}' to 'wchar_t*' [-fpermissive]
       { return wmemchr(__s, __a, __n); }
                                     ^
In file included from c:mingwlibgccmingw324.9.3includec++itspostypes.h:40:0,
                 from c:mingwlibgccmingw324.9.3includec++iosfwd:40,
                 from c:mingwlibgccmingw324.9.3includec++ios:38,
                 from c:mingwlibgccmingw324.9.3includec++ostream:38,
                 from c:mingwlibgccmingw324.9.3includec++iostream:39,
                 from ariprog.cpp:8:
c:mingwlibgccmingw324.9.3includec++cwchar:228:3: note: initializing argument 1 of 'wchar_t* std::wmemchr(wchar_t*, wchar_t, std::size_t)'
   wmemchr(wchar_t* __p, wchar_t __c, size_t __n)
   ^
In file included from c:mingwlibgccmingw324.9.3includec++ios:40:0,
                 from c:mingwlibgccmingw324.9.3includec++ostream:38,
                 from c:mingwlibgccmingw324.9.3includec++iostream:39,
                 from ariprog.cpp:8:
c:mingwlibgccmingw324.9.3includec++itschar_traits.h: In static member function 'static std::char_traits<wchar_t>::char_type* std::char_traits<wchar_t>::move(std::char_traits<wchar_t>::char_type*, const char_type*, std::size_t)':
c:mingwlibgccmingw324.9.3includec++itschar_traits.h:342:40: error: 'wmemmove' was not declared in this scope
       { return wmemmove(__s1, __s2, __n); }
                                        ^
c:mingwlibgccmingw324.9.3includec++itschar_traits.h: In static member function 'static std::char_traits<wchar_t>::char_type* std::char_traits<wchar_t>::copy(std::char_traits<wchar_t>::char_type*, const char_type*, std::size_t)':
c:mingwlibgccmingw324.9.3includec++itschar_traits.h:346:39: error: 'wmemcpy' was not declared in this scope
       { return wmemcpy(__s1, __s2, __n); }
                                       ^
c:mingwlibgccmingw324.9.3includec++itschar_traits.h: In static member function 'static std::char_traits<wchar_t>::char_type* std::char_traits<wchar_t>::assign(std::char_traits<wchar_t>::char_type*, std::size_t, std::char_traits<wchar_t>::char_type)':
c:mingwlibgccmingw324.9.3includec++itschar_traits.h:350:37: error: 'wmemset' was not declared in this scope
       { return wmemset(__s, __a, __n); }
                                     ^
In file included from c:mingwlibgccmingw324.9.3includec++extstring_conversions.h:41:0,
                 from c:mingwlibgccmingw324.9.3includec++itsasic_string.h:2849,
                 from c:mingwlibgccmingw324.9.3includec++string:52,
                 from c:mingwlibgccmingw324.9.3includec++itslocale_classes.h:40,
                 from c:mingwlibgccmingw324.9.3includec++itsios_base.h:41,
                 from c:mingwlibgccmingw324.9.3includec++ios:42,
                 from c:mingwlibgccmingw324.9.3includec++ostream:38,
                 from c:mingwlibgccmingw324.9.3includec++iostream:39,
                 from ariprog.cpp:8:
c:mingwlibgccmingw324.9.3includec++cstdlib: At global scope:
c:mingwlibgccmingw324.9.3includec++cstdlib:201:11: error: '::lldiv_t' has not been declared
   using ::lldiv_t;
           ^
c:mingwlibgccmingw324.9.3includec++cstdlib:207:11: error: '::_Exit' has not been declared
   using ::_Exit;
           ^
c:mingwlibgccmingw324.9.3includec++cstdlib:211:11: error: '::llabs' has not been declared
   using ::llabs;
           ^
c:mingwlibgccmingw324.9.3includec++cstdlib:213:10: error: 'lldiv_t' does not name a type
   inline lldiv_t
          ^
c:mingwlibgccmingw324.9.3includec++cstdlib:217:11: error: '::lldiv' has not been declared
   using ::lldiv;
           ^
c:mingwlibgccmingw324.9.3includec++cstdlib:228:11: error: '::atoll' has not been declared
   using ::atoll;
           ^
c:mingwlibgccmingw324.9.3includec++cstdlib:229:11: error: '::strtoll' has not been declared
   using ::strtoll;
           ^
c:mingwlibgccmingw324.9.3includec++cstdlib:230:11: error: '::strtoull' has not been declared
   using ::strtoull;
           ^
c:mingwlibgccmingw324.9.3includec++cstdlib:232:11: error: '::strtof' has not been declared
   using ::strtof;
           ^
c:mingwlibgccmingw324.9.3includec++cstdlib:233:11: error: '::strtold' has not been declared
   using ::strtold;
           ^
c:mingwlibgccmingw324.9.3includec++cstdlib:241:22: error: '__gnu_cxx::lldiv_t' has not been declared
   using ::__gnu_cxx::lldiv_t;
                      ^
c:mingwlibgccmingw324.9.3includec++cstdlib:243:22: error: '__gnu_cxx::_Exit' has not been declared
   using ::__gnu_cxx::_Exit;
                      ^
c:mingwlibgccmingw324.9.3includec++cstdlib:245:22: error: '__gnu_cxx::llabs' has not been declared
   using ::__gnu_cxx::llabs;
                      ^
c:mingwlibgccmingw324.9.3includec++cstdlib:246:22: error: '__gnu_cxx::div' has not been declared
   using ::__gnu_cxx::div;
                      ^
c:mingwlibgccmingw324.9.3includec++cstdlib:247:22: error: '__gnu_cxx::lldiv' has not been declared
   using ::__gnu_cxx::lldiv;
                      ^
c:mingwlibgccmingw324.9.3includec++cstdlib:249:22: error: '__gnu_cxx::atoll' has not been declared
   using ::__gnu_cxx::atoll;
                      ^
c:mingwlibgccmingw324.9.3includec++cstdlib:250:22: error: '__gnu_cxx::strtof' has not been declared
   using ::__gnu_cxx::strtof;
                      ^
c:mingwlibgccmingw324.9.3includec++cstdlib:251:22: error: '__gnu_cxx::strtoll' has not been declared
   using ::__gnu_cxx::strtoll;
                      ^
c:mingwlibgccmingw324.9.3includec++cstdlib:252:22: error: '__gnu_cxx::strtoull' has not been declared
   using ::__gnu_cxx::strtoull;
                      ^
c:mingwlibgccmingw324.9.3includec++cstdlib:253:22: error: '__gnu_cxx::strtold' has not been declared
   using ::__gnu_cxx::strtold;
                      ^
In file included from c:mingwlibgccmingw324.9.3includec++extstring_conversions.h:43:0,
                 from c:mingwlibgccmingw324.9.3includec++itsasic_string.h:2849,
                 from c:mingwlibgccmingw324.9.3includec++string:52,
                 from c:mingwlibgccmingw324.9.3includec++itslocale_classes.h:40,
                 from c:mingwlibgccmingw324.9.3includec++itsios_base.h:41,
                 from c:mingwlibgccmingw324.9.3includec++ios:42,
                 from c:mingwlibgccmingw324.9.3includec++ostream:38,
                 from c:mingwlibgccmingw324.9.3includec++iostream:39,
                 from ariprog.cpp:8:
c:mingwlibgccmingw324.9.3includec++cstdio:175:11: error: '::snprintf' has not been declared
   using ::snprintf;
           ^
c:mingwlibgccmingw324.9.3includec++cstdio:176:11: error: '::vfscanf' has not been declared
   using ::vfscanf;
           ^
c:mingwlibgccmingw324.9.3includec++cstdio:177:11: error: '::vscanf' has not been declared
   using ::vscanf;
           ^
c:mingwlibgccmingw324.9.3includec++cstdio:178:11: error: '::vsnprintf' has not been declared
   using ::vsnprintf;
           ^
c:mingwlibgccmingw324.9.3includec++cstdio:179:11: error: '::vsscanf' has not been declared
   using ::vsscanf;
           ^
c:mingwlibgccmingw324.9.3includec++cstdio:185:22: error: '__gnu_cxx::snprintf' has not been declared
   using ::__gnu_cxx::snprintf;
                      ^
c:mingwlibgccmingw324.9.3includec++cstdio:186:22: error: '__gnu_cxx::vfscanf' has not been declared
   using ::__gnu_cxx::vfscanf;
                      ^
c:mingwlibgccmingw324.9.3includec++cstdio:187:22: error: '__gnu_cxx::vscanf' has not been declared
   using ::__gnu_cxx::vscanf;
                      ^
c:mingwlibgccmingw324.9.3includec++cstdio:188:22: error: '__gnu_cxx::vsnprintf' has not been declared
   using ::__gnu_cxx::vsnprintf;
                      ^
c:mingwlibgccmingw324.9.3includec++cstdio:189:22: error: '__gnu_cxx::vsscanf' has not been declared
   using ::__gnu_cxx::vsscanf;
                      ^
In file included from c:mingwlibgccmingw324.9.3includec++string:52:0,
                 from c:mingwlibgccmingw324.9.3includec++itslocale_classes.h:40,
                 from c:mingwlibgccmingw324.9.3includec++itsios_base.h:41,
                 from c:mingwlibgccmingw324.9.3includec++ios:42,
                 from c:mingwlibgccmingw324.9.3includec++ostream:38,
                 from c:mingwlibgccmingw324.9.3includec++iostream:39,
                 from ariprog.cpp:8:
c:mingwlibgccmingw324.9.3includec++itsasic_string.h: In function 'long long int std::stoll(const string&, std::size_t*, int)':
c:mingwlibgccmingw324.9.3includec++itsasic_string.h:2873:31: error: 'strtoll' is not a member of 'std'
   { return __gnu_cxx::__stoa(&std::strtoll, "stoll", __str.c_str(),
                               ^
c:mingwlibgccmingw324.9.3includec++itsasic_string.h: In function 'long long unsigned int std::stoull(const string&, std::size_t*, int)':
c:mingwlibgccmingw324.9.3includec++itsasic_string.h:2878:31: error: 'strtoull' is not a member of 'std'
   { return __gnu_cxx::__stoa(&std::strtoull, "stoull", __str.c_str(),
                               ^
c:mingwlibgccmingw324.9.3includec++itsasic_string.h: In function 'float std::stof(const string&, std::size_t*)':
c:mingwlibgccmingw324.9.3includec++itsasic_string.h:2884:31: error: 'strtof' is not a member of 'std'
   { return __gnu_cxx::__stoa(&std::strtof, "stof", __str.c_str(), __idx); }
                               ^
c:mingwlibgccmingw324.9.3includec++itsasic_string.h: In function 'long double std::stold(const string&, std::size_t*)':
c:mingwlibgccmingw324.9.3includec++itsasic_string.h:2892:31: error: 'strtold' is not a member of 'std'
   { return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); }
                               ^
c:mingwlibgccmingw324.9.3includec++itsasic_string.h: In function 'std::string std::to_string(int)':
c:mingwlibgccmingw324.9.3includec++itsasic_string.h:2899:45: error: 'vsnprintf' is not a member of 'std'
   { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, 4 * sizeof(int),
                                             ^
c:mingwlibgccmingw324.9.3includec++itsasic_string.h: In function 'std::string std::to_string(unsigned int)':
c:mingwlibgccmingw324.9.3includec++itsasic_string.h:2904:45: error: 'vsnprintf' is not a member of 'std'
   { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf,
                                             ^
c:mingwlibgccmingw324.9.3includec++itsasic_string.h: In function 'std::string std::to_string(long int)':
c:mingwlibgccmingw324.9.3includec++itsasic_string.h:2910:45: error: 'vsnprintf' is not a member of 'std'
   { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, 4 * sizeof(long),
                                             ^
c:mingwlibgccmingw324.9.3includec++itsasic_string.h: In function 'std::string std::to_string(long unsigned int)':
c:mingwlibgccmingw324.9.3includec++itsasic_string.h:2915:45: error: 'vsnprintf' is not a member of 'std'
   { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf,
                                             ^
c:mingwlibgccmingw324.9.3includec++itsasic_string.h: In function 'std::string std::to_string(long long int)':
c:mingwlibgccmingw324.9.3includec++itsasic_string.h:2921:45: error: 'vsnprintf' is not a member of 'std'
   { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf,
                                             ^
c:mingwlibgccmingw324.9.3includec++itsasic_string.h: In function 'std::string std::to_string(long long unsigned int)':
c:mingwlibgccmingw324.9.3includec++itsasic_string.h:2927:45: error: 'vsnprintf' is not a member of 'std'
   { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf,
                                             ^
c:mingwlibgccmingw324.9.3includec++itsasic_string.h: In function 'std::string std::to_string(float)':
c:mingwlibgccmingw324.9.3includec++itsasic_string.h:2936:45: error: 'vsnprintf' is not a member of 'std'
     return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n,
                                             ^
c:mingwlibgccmingw324.9.3includec++itsasic_string.h: In function 'std::string std::to_string(double)':
c:mingwlibgccmingw324.9.3includec++itsasic_string.h:2945:45: error: 'vsnprintf' is not a member of 'std'
     return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n,
                                             ^
c:mingwlibgccmingw324.9.3includec++itsasic_string.h: In function 'std::string std::to_string(long double)':
c:mingwlibgccmingw324.9.3includec++itsasic_string.h:2954:45: error: 'vsnprintf' is not a member of 'std'
     return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n,
                                             ^
c:mingwlibgccmingw324.9.3includec++itsasic_string.h: In function 'long long int std::stoll(const wstring&, std::size_t*, int)':
c:mingwlibgccmingw324.9.3includec++itsasic_string.h:2976:31: error: 'wcstoll' is not a member of 'std'
   { return __gnu_cxx::__stoa(&std::wcstoll, "stoll", __str.c_str(),
                               ^
c:mingwlibgccmingw324.9.3includec++itsasic_string.h: In function 'long long unsigned int std::stoull(const wstring&, std::size_t*, int)':
c:mingwlibgccmingw324.9.3includec++itsasic_string.h:2981:31: error: 'wcstoull' is not a member of 'std'
   { return __gnu_cxx::__stoa(&std::wcstoull, "stoull", __str.c_str(),
                               ^
c:mingwlibgccmingw324.9.3includec++itsasic_string.h: In function 'float std::stof(const wstring&, std::size_t*)':
c:mingwlibgccmingw324.9.3includec++itsasic_string.h:2987:31: error: 'wcstof' is not a member of 'std'
   { return __gnu_cxx::__stoa(&std::wcstof, "stof", __str.c_str(), __idx); }
                               ^
c:mingwlibgccmingw324.9.3includec++itsasic_string.h: In function 'long double std::stold(const wstring&, std::size_t*)':
c:mingwlibgccmingw324.9.3includec++itsasic_string.h:2995:31: error: 'wcstold' is not a member of 'std'
   { return __gnu_cxx::__stoa(&std::wcstold, "stold", __str.c_str(), __idx); }

推荐答案

感谢@SilencePhil,我找到了相关的StackOverflow 答案.这个问题不是同一个问题,但有相同的解决方法,即在对std=c++11替换为std=gnu++11>g++.

Thanks to @SilencePhil, I found a relevant StackOverflow answer. This question is not the same question, but has the same solution, namely to replace std=c++11 with std=gnu++11 in the call to g++.

相关文章