0

it's supposed g++ (tdm-1) 4.7.1 that comes with codeblocks for windows support all C++11 features, std::stoi(str) isnt reconized, same for other c++11 functions. (string header is included).

Do i need to look for another compiler ?

Cfun
  • 8,442
  • 4
  • 30
  • 62

1 Answers1

1

This is due to missing C library functions in MinGW, see the last few comments on https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37522

I made some improvements so it is supported in MinGW GCC 4.9 and later, so you could just upgrade to a later TDM build.

Jonathan Wakely
  • 166,810
  • 27
  • 341
  • 521
  • where can i download the official MinGW GCC 4.9 ? – Cfun Sep 28 '15 at 18:49
  • @HelloWorld, that patch breaks code, the change I committed is much simpler and safer and could be applied to the GCC 4.7 header: https://gcc.gnu.org/viewcvs/gcc/branches/gcc-4_9-branch/libstdc%2B%2B-v3/include/bits/basic_string.h?r1=223840&r2=223839&pathrev=223840 – Jonathan Wakely Sep 28 '15 at 18:52
  • @Cfun, did you try mingw.org? – Jonathan Wakely Sep 28 '15 at 18:52