News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

C++0x supported in default compiler under CB 10.05

Started by er, August 16, 2010, 11:00:07 PM

Previous topic - Next topic

er

Hello,

My understanding is that CB comes with a pre-installed compiler. I though I had read it is GCC4.4 under CB 10.05. However, I enable c++0x in the compiler settings > Compiler flags, and here's what I get:

Compiling: main.cpp
cc1plus: error: unrecognized command line option "-std=c++0x"

Some help would be appreciated. Thanks.
Code::Blocks 10.05/ Mac OS X 10.6.4/GCC

stahta01

You are likely using an Compiler that is too old.

I just used the Compiler that is sometimes packaged with CB 10.05 and the option "-std=c++0x" worked.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

er

Quote from: stahta01 on August 17, 2010, 03:39:10 PM
You are likely using an Compiler that is too old.

I just used the Compiler that is sometimes packaged with CB 10.05 and the option "-std=c++0x" worked.

Tim S.

Thanks. Yes, I know, it's using the compiler that already resides on my machine, GCC 4.2 probably.

Under Mac OS X?

How can I make sure it is packaged with the right compiler?

Code::Blocks 10.05/ Mac OS X 10.6.4/GCC

oBFusCATed

Find your gcc/g++ executable and execute "gcc --version/g++ --version" in a terminal
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]