My host has installed c++11 and g++ 4.7.2 (I'm told), but we can't figure out how to set 4.7.2 to default as g++ --version
still says I'm 4.1.2.
Stack has shown me that I can't sort multidimensional vector of ints? without cc1plus: error: unrecognized command line option "-std=c++11" with g++, but all of the answers I come across for setting the default don't seem to work.
CentOS 5.9
I'm using CentOS 5.9, and I have no idea if that's the issue, but I tried g++-4.7
and g++-4.7.2
from How to change version of g++ compiler from 4.1.2 to 4.5?, but SSH says sudo: apt-get: command not found
and -bash: g++-4.7: command not found
for both (.2
for .2). If I put a space before -4.7
, it says g++: unrecognized option '-4.7'
.
I tried the suggested solution from the A of my last c++ q here, and the command executes without error, but nothing is returned, and g++ --version
still gives:
g++ (GCC) 4.1.2 20080704 (Red Hat 4.1.2-54)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
GCC?
I've seen this associated with g++ on many links, but I don't even know what it is, and I'm afraid to try this for risk of nuking my system.
My host says this is the limit of their support, so I'm totally on my own. Also, please understand that I just started C++ a week or two ago and have no knowledge of linux.
Please help! Many thanks in advance!