libc++ 和 libstdc++ 的区别

参考:https://stackoverflow.com/questions/34654682/unrecognized-command-line-option-stdlib-libc-gcc-homebrew-gcc-5-3-0-5-3-0

As the error message says, the gcc compiler has no such commandline option as -stdlib. The LLVM clang compiler does. That is because clang offers you the choice of linking the LLVM standard C++ library (libc++) or the GNU standard C++ library (libstdc++), whereas gcc supports only libstdc++.

根据答案来看,libc++ 指的是 LLVM 标准 C++ 库, libstdc++ 指的是 GNU 标准 C++ 库。

clang 可以选择是链接 libc++ 或者 libstdc++。而 g++ 则仅仅支持 libstdc++。

你可能感兴趣的:(c++,开发语言)