G ++ does not compile std = C ++ 0x under Snow Leopard

Having an old Intel Core Duo MacBook with Snow Leopard, when I try to compile with g ++ and the input parameter std = C ++ 0x, I get:

cc1plus: error: unrecognized command line option "-std=c++0x" 

Any ideas on how to fix this?

+6
source share
1 answer
Support

C ++ 0x / C ++ 11 added only with gcc v4.3, see this page to check which C ++ function was added to which version of gcc.

Alternatively, you can use the clang ++ compiler, which also comes with Xcode. See this page for version information.

Or install gcc47 from macports

Btw, it is better to use -std=c++11 , the c++0x parameter is not supported by clang.

+6
source

Source: https://habr.com/ru/post/927234/


All Articles