Code::Blocks Forums
User forums => Help => Topic started by: Geowil on March 17, 2014, 04:04:08 am
-
After installing Code::Blocks I ported my code over to a new CB project and tried to build it. It got about 300 errors stating that to_string was not declared within the scope of the code. I also got this error for atoi and floor. I did some intense Googling and found that this is caused by a bug in MinGW 4.7. So I downloaded TDM 4.8.1 and installed it over the Mingw folder in the codeblocks directory but the problems still persist.
I have checked the c++11 flag in build options and I have repointed my toolchain exes but the errors are still showing up; they don't in MSVS 2012. Am I missing something or is Mingw just not ready for c++11 code yet?
Edit:
A bit more info:
Windows 7 64-bit
CB 13.12
Mingw 4.8.1 (tried 32 & 64 bit)
-
installing something over a other thing is always a bad idea. It is better to uninstall/delete the old version, and install then the new.
Have you checked that you are using the right compiler path? Have you also a c:\mingw folder? Delete it, or use only this one (what i would prefere)
greetings
-
installing something over a other thing is always a bad idea. It is better to uninstall/delete the old version, and install then the new.
Have you checked that you are using the right compiler path? Have you also a c:\mingw folder? Delete it, or use only this one (what i would prefere)
greetings
Under your advice I uninstalled Code::Blocks and then reinstalled it. I also deleted my Mingw folder and redownloaded both the 32-bit and 64-bit versions from TDM. I attempted to use the 32-bit version of Mingw again, this time I unchecked the "create PATH entry" line during install and deleted the Mingw folder contents in the Codeblocks folder. After reapplying the correct flags I attempted to compile the default hello world program with a to_string call added but it would still not compile.
After some more searching I read that the only version of Mingw that has been found to work with c++11 is the 64-bit version. So I deleted out the Mingw folder again and installed the 64-bit version then moved the files over and retargeted the toolchain links. This time it was able to compile the program with the to_string line in it. Not sure why the 32-bit version of 4.8.1 doesn't work.
-
Personaly, I have TDM 32 and 64 bits version installed and working. They are respectively installed in C:MinGW32 and C:\MinGW64 and configured like that in compilers CB base paths.
As told on TDM site, it's better to avoid C:\MinGW.
In my path they are declared as follow : C:\MinGW32\bin;C:\MinGW64\bin;... in this order.
In C::B, the 64 bits compiler versions are configured with their specific name x86_64_...
Like that it works perfectly.
gd_on
-
Personaly, I have TDM 32 and 64 bits version installed and working. They are respectively installed in C:MinGW32 and C:\MinGW64 and configured like that in compilers CB base paths.
As told on TDM site, it's better to avoid C:\MinGW.
In my path they are declared as follow : C:\MinGW32\bin;C:\MinGW64\bin;... in this order.
In C::B, the 64 bits compiler versions are configured with their specific name x86_64_...
Like that it works perfectly.
gd_on
Just tried your setup (using D:\TDM-GCC-32\bin and -64\bin) and it does not work for me (32-bit errors out on to_string while 64-bit does not). Wondering if something else on my system is interfering with Code::Blocks.