在zprofile里面添加了
alias gcc='gcc-11'
alias g++="g++-11"
alias cc="gcc-11"
alias c++="c++-11"
输入命令是显示的g++ 但是使用make编译的时候提示错误
mac@macdeMac % make
make -C ./BaseLib RELEASE=0
g++ -Wall -std=gnu++17 -fPIC -g -pg -c -lc_p -I ./ ./BaseLib.cpp
clang: warning: -lc_p: 'linker' input unused [-Wunused-command-line-argument]
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Apple clang version 13.0.0 (clang-1300.0.29.3)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
clang: error: unable to execute command: Segmentation fault: 11
clang: note: diagnostic msg: Error generating preprocessed source(s).
make[1]: *** [BaseLib.o] Error 254
make: *** [libBaseLib.so] Error 2
感觉又变回了clang一样