我的个人资料已更新以指向我认为正确的位置:
PATH=${PATH}:/Applications/Xcode.app/Contents/Developer/usr/bin:${PATH}
找到编译器
[11:39:32] ~: $ which g++
/Applications/Xcode.app/Contents/Developer/usr/bin//g++
[11:39:35] ~: $ which gcc
/Applications/Xcode.app/Contents/Developer/usr/bin//gcc
Hello World 如下所示
#include <iostream>
using namespace std;
int main ()
{
cout << "Hello World!";
return 0;
}
无法从命令行和 TextMate 执行
[11:40:15] Desktop: $ g++ untitled.cpp
untitled.cpp:1:20: error: iostream: No such file or directory
untitled.cpp: In function ‘int main()’:
untitled.cpp:6: error: ‘cout’ was not declared in this scope
我还应该在我的路上还有什么遗漏?