I will work for a month in a computer that is not mine, thus returning it back as soon as I am done. However, I can be root.
The problem is that I can not run C++11. I am not interested in the latest compiler, just a compiler who can support some C++11 (for example, I do not care about regex).
I tried all these:
sudo yum install gcc-c++
which gives:
Loaded plugins: dellsysidplugin, kernel-module, refresh-packagekit
Setting up Install Process
Package gcc-c++-4.3.2-7.i386 already installed and latest version
Nothing to do
sudo update-alternatives --config gcc
gives nothing
bash-3.2$ g++ --version
which gives:
g++ (GCC) 4.3.2 20081105 (Red Hat 4.3.2-7)
Copyright (C) 2008 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.
yum groupinstall "Development Tools"
says all up to the latest version
Some compilation:
bash-3.2$ g++ px.cpp -std=c++0x -o px
px.cpp:2:18: error: chrono: No such file or directory
What can I do? The problem lies on fedora 10? I do not know if I am allowed to update the OS of the computer (which is ancient, battery messages at start up, just to get a glance of it). Moreover, since it is ancient, I am afraid not to destroy it (by upgrading).
Simply download binutils and gcc and the other prerequisites sources as tarball. Unpack and compile to every directory you want. Compile takes maybe 10 minutes and you are finished. I have also a very! old suse linux with a wide variant of compilers in parallel.
Edit: add link to gcc wiki
http://gcc.gnu.org/wiki/InstallingGCC
BTW and not a real answer to the OP question but a fast solution:
What do you think about downloading fedora 20, burn a CD or use a big enough usb stick, boot from CD or usb stick and mount the volume on your laptop and have fun. In fedora 20 the gcc 4.8.2 is in. Should be an alternative from some quit tasks.
If you only want very small examples to run, you also can use a only compiler: http://www.compileonline.com/compile_cpp11_online.php for example. A lot more can be find by G* and others.