Std::to_string() not found in standard library
-
As you can guess the problem is here -> std::to_string()
If you download and install the following version [Qt 5.0.1 for Windows 32-bit (MinGW 4.7, 823 MB)]
you won't be able to compile your project.This is apparently a known bug in mingw ("stackoverflow link here":http://stackoverflow.com/questions/12975341/to-string-is-not-a-member-of-std-says-so-g#answer-12975602)
"here is the given link":http://tehsausage.com/mingw-to-string to the patch, but I can't get it work by doing the changes by myself. My Qt install even got fucked up after I did it (no more compilation possible).
Could you (Qt) fix it please, Or give an easy work around for this problem ?
(i'm actually installing the VS2010 version, hope it's working) -
Since this problem is already present on stackoverflow, I assume this bug as already been reported. -(Also i hate the fact that i have to create a new account to post there)-
Otherwise, by posting this here, i had in mind to get a solution from someone who encountered the same problem.
Anyone ?
-
This is not a Qt bug. Neither Qt4 nor Qt5. It is an issue of MinGW as it looks. to_string is a fairly "new option":http://en.cppreference.com/w/cpp/string/basic_string/to_string of C++ .
I would not assume that lots of SW is around using already to_string. If so, they did not use the standard libs only, but also an implementation of the future standard. So, you can use this lib whatever it is.
If you like to do it with Qt you may have a look to "QString::arg methods.":http://qt-project.org/doc/qt-5.0/qtcore/qstring.html#arg