The command g++ -o myprogram myprogram.c -std=c++0x
works well on ubuntu but when I try the same with centos it throws me an error cc1plus: error: unrecognized command line option "-std=c++0x"
. Even google doesn't give the answer. Have anybody experienced it before? Does anybody know the solution?
views:
67answers:
1
+3
A:
You most likely have different versions of the compiler on each system, run g++ --version
to see which version you're running on each (-std=c++0x
is only supported from version 4.4 of g++).
Motti
2010-09-06 08:17:14
How to update g++ to version 4.4 in centos?
Sunil
2010-09-06 16:46:22
@Sunil, sorry I haven't the foggiest clue.
Motti
2010-09-06 18:20:20
You can always download the TAR file and build it yourself: http://gcc.gnu.org/install/
Employed Russian
2010-09-07 03:31:40