User forums > Using Code::Blocks

Updating GCC

<< < (2/2)

oBFusCATed:

--- Quote from: Jc6828 on October 10, 2011, 11:49:17 am ---If I do that and download a new Code::Blocks and re-install that will that include the latest version of GCC or will it still be the same as the one I am currently using.

--- End quote ---
We have a windows installer,  which includes Mingw in it just for convenience.
We don't update the installer when a new MinGW is released.

p.s. you don't have to uninstall the old compiler, just change the config in the global options.

Jc6828:
What I have done is delete the contents of the mingw folder and then installed using tdm-gcc-4.6.1.exe into that folder.

Code:Blocks runs OK and appears to compile OK but I still get the error referred to in my original post if I only use a single pair of braces.

Is there any way I can ask Code::Blocks to tell me the version of GCC it is using as this error was supposed to have been fixed in GCC 4.6?

zabzonk:
I can confirm that the problem is fixed in GCC 4.6 - just tried it with the TDM build. It sounds like you still have the old GCC installed. I would recommend installing TDM GCC in a folder completely unrelated to CodeBlocks, and check that your code works from the command line. I have  a blog article on how to do this at http://latedev.wordpress.com/2011/06/20/how-to-install-a-c-compiler-on-windows - then, once you have it compiling from the command line, integrate it into CB via the toolchain dialog.

BTW, a tool I have found extremely handy for resolving issues like this is Everything, free at http://www.voidtools.com - you can easily find all copies of GCC  using this, which might be more than you would be expecting - several other tools install their own copies of GCC.

oBFusCATed:

--- Quote from: Jc6828 on October 10, 2011, 10:54:08 am ---According to the C++ Forum this has been fixed in GCC >4.6

--- End quote ---
'>' or '>='?

To see the version of gcc, open a terminal and cd to the folder with your installation and execute "gcc --version" or "g++ version".

Jc6828:
Thanks Neil and oBFusCATed

oBFusCATed I tried running "gcc --version" and it told me GCC 4.6.1 so it seems OK from that point of view.

Neil thanks for your info; I will try your suggestion when I have more time. The program does run OK, it is only a warning about the braces so for now I will live with it as, as seems common with Windows since I changed from ARM machines, I seem to spend more time housekeeping and getting the machine to do what I want it to do rather than what microsoft seem to want it to do. Maybe Linux is calling more loudly than before!!

But thanks to all who helped me, it is appreciated.

Navigation

[0] Message Index

[*] Previous page

Go to full version