c++ 开发环境基本需要文本编辑器 和 c++ 编译器,前者将编辑人类可读 c++ 源码,后者将源码转换成机器可读的一系列指令
以我本地 mac 环境为例:
文本编辑器: vim
terminal 执行: vim - v
c++ 编译器: GNU
terminal 执行: g++ -v :
g++ -v
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin14.1.0
Thread model: posix
编译:
terminal : g++ hello.cpp -o hello