我试图编译学校基本的C++程序,当我尝试从Mac终端(10.7.6)运行它,我得到这个消息:LD:库找不到-lgcc_ext.10.5
ld: library not found for -lgcc_ext.10.5
collect2: error: ld returned 1 exit status
我确定在正确的目录下并安装了XCode命令行工具。这里是我的命令提示符:
g++ -o chapter_2 hello_world.cpp
这是我的基本C++程序。
#include <iostream>
using namespace std;
int main(){
cout << "Hello world" << endl;
}
确实libgcc_ext.10.5。*存在于系统中? – EHuhtala