I have heard that there are some issues when installing the 4.9 GCC release on any Linux distro. Is this true? In any case, can someone tell me how to install the 4.9 GCC release on any Linux distro? Thanks!
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
I have heard that there are some issues when installing the 4.9 GCC release on any Linux distro. Is this true? In any case, can someone tell me how to install the 4.9 GCC release on any Linux distro? Thanks!
Name |
---|
The title says C++11 compiler. you don't have to install gcc4.9 to have most features of c++11. Just compile with --std=c++11
I get the folowwing error message when trying to compile with --std=c++11: cc1plus: error: unrecognized command line option ‘--std=c++11’
:(
Well, what compiler do you use?
I use GCC 4.6.3, but when I try to update it via terminal, I get a message telling me that I have the latest version.
Try
-std=c++11
with one-
I get the following error but with one
-
What ubuntu version do you use?
I use elementary OS which is based on Ubuntu 12.04
I think all because of old Ubuntu 12.04 repos. I would recommend upgrading if you can.
As of now this version of Elementary OS is not upgradeable to any 14.04 repos. But thanks for your reply.
use -std=c++0x, bro
That command does work, thanks! :)
1 — http://askubuntu.com/questions/428198/getting-installing-gcc-g-4-9-on-ubuntu
2 — http://stackoverflow.com/questions/10363646/compiling-c11-with-g
You'd better use the following command in shell: sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install gcc-4.7 g++-4.7
Then you can use the command g++ with the option -std=c++11 to compile the code in c++11 mode. Good luck