macos - 怎样让clang默认支持C++11?
PHP中文网
PHP中文网 2017-04-17 13:22:08
0
2
946
PHP中文网
PHP中文网

认证高级PHP讲师

reply all(2)
迷茫

It cannot be set directly, but we can save the country through curves

If you are using bash

echo "alias g++='g++ -std=c++11'" >> ~/.bashrc'
source ~/.bashrc

In case of zsh

echo "alias g++='g++ -std=c++11'" >> ~/.zshrc'
source ~/.zshrc

In this way, g++ will come with this parameter, or you can use an alias such as g++11

黄舟

I don’t know how to set it up, but you can write a shell script, hahaha:

#!/bin/sh
clang++ -std=c++11 "$@"
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template