-
Notifications
You must be signed in to change notification settings - Fork 43
unrecognized command line option “ std=c 11”
cheyiliu edited this page Dec 12, 2014
·
1 revision
- 出现这个编译错误的原因在g++ gcc 版本不够高。
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test
- sudo apt-get update
- sudo apt-get install gcc-4.8 g++-4.8
- ls -lh /usr/bin/g++*
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8
- sudo update-alternatives --config gcc 选择4.8的序号
- g++ --version
Just build something.