and that's what i get. I've also tried using it in a current project and same results. iostream and string is included (i heard somewhere #include <memory> could help but is didn't). I have also tried 0x's standards. (-std=c++0x) I don't know what else to try, any help is appreciated.
Are you on Windows using MinGW? I remember stuff like that being a problem.
What version of g++ do you have?
I searched google and this patch might help http://tehsausage.com/mingw-to-string (Though I won't be able to help if something goes wrong here ;p)
Edit: On GCC 4.9.1, I don't have a problem with to_string, so I would suggest updating your compiler. CodeBlocks makes this relatively easy to link.
Oh yeah sorry, im on windows 7.using MinGW . I had thought this might be the problem and went to mingw's site and downloaded the mingw-get-setup which i just went under the assumption that this would give me the most recent version of gcc. (installed to codeblocks, same results.) so apparently that's how you not get the latest version. if you think that would be the problem. where is the link to the most recent version, that's all that i found on the site >.< edit: ill try Ganado's post first
It most likely did give you the right version, but codeblocks comes with its own mingw version that is out of date. So the version you downloaded from their site would have to replace codeblock's version, or have its directoried pointing to the new mingw version's gcc and g++
Actually crimsonzero2, the mingw website seems kinda outdated. I could be wrong.
Edit: Didn't see your latest post.
Just to be sure, when you go in Code Blocks and then Compiler Settings -> Toolchain executables, the "Compiler's installation directory" is your updated one correct?
If it is, then I'm not really sure what the problem is.
Just to be sure, when you go in Code Blocks and then Compiler Settings -> Toolchain executables, the "Compiler's installation directory" is your updated one correct?
yeah because i just replaced what was in it's default MinGW folder with the ones i had updated. which is 4.8.1 so that way i didnt have to configure new paths.
Yeah... this must be frustrating for you, it's annoying I'm sure.
yeah, was quite the roadblock in my current project. ill attempt to just get the 4.9.1 , the new features help anyways.
Edit: "My MinGW distribution ("distro") is x64-native" from - http://nuwen.net/mingw.html
64 bit,? im on 32 at the moment, if this means 64 bit(im assuming thats what that means) then its pointless trying to get that 4.9.1.can someone confirm am i correct on that's what there saying. unless he's just reffering to his MinGW and the gcc is 4.9.1 and possibly cross compatible in 32 and 64, the download is "mingw-12.1" should i just extract that somewhere and take the gcc files out and put them in mine?
edit2: i'm just trying that and hoping that the gcc in his MinGW happens to be 32 (with precautious backup measures taken of course) will get back to posting results after its done extracting.
Yeah the gcc there is 64 bit . This roadblock of steel. if anyone comes up with any other solutions at all please post.I will post a solution if i find one.
edit:fogot to post that the http://tehsausage.com/mingw-to-string patch gonado originaly posted did not work . (properly installed, same error)
Uhh, re-download codeblocks with the mingw package?
Try to use command line to make sure this is a problem with codeblocks instead of mingw,
-Open a random folder
-make a basic c++11 .cpp file
-shift right click on the folder and "open command window here"
-do:
Uhh, re-download codeblocks with the mingw package?
Try to use command line to make sure this is a problem with codeblocks instead of mingw,
-Open a random folder
-make a basic c++11 .cpp file
-shift right click on the folder and "open command window here"
-do:
PATH=C:\Program Files (x86)\CodeBlocks\MinGW\bin
(or if you use 32bit, there is no (x86))
-do:
g++ -o -std=c++11 test.cpp test
-open test.exe
had some problems compiling out side of the g++ directory so i just added "test.cpp" in MinGW/bin and compiled from there. it compiled. but g++ gave the same error. so yeah its mingw not codeblocks .-. .. thanks though that did narrow it down a little :) atleast i know its g++ thats the problem and not my code blocks config
i am using orwell dev C++ in windows 7, because its syntax highlighting is much better than codeblocks, also in my pc exe made by codeblocks are often blocked by avast antivirus.
in dev C++ you can set 11 standard by,
tools > compiler option > setting > code generation > in language standard (-std) select ISO C++ 11
sigh..................... literally just compiled directly from that g++ and got the error. thats impossible its 4.9.1 , i did not use code blocks i compiled using g++ commands. Seriously what's going on. can someone test this? download it and run the g++ straight from there using the to_string example it has to be something funked in my computer.
edit: also running g++ --version in that folder does in fact return 4.9.1 like its supposed to. I have no idea whats up with this