我刚刚下载了 CLang 源代码,使用 CMake 创建了一个 Visual C++ 10 IDE 工作区,并从 Visual C++ 10.0 (express) 构建了所有内容。
现在我在 hello world 上收到一堆链接器错误:
d:\dev\test> 输入 con >foo.cpp
#include <iostream>
使用命名空间标准;
int main() { cout << "你好,cling-clong 世界!" <<endl; }
^Z
d:\dev\test> clang++ foo.cpp
foo-839435.o:错误 LNK2019:未解析的外部符号 __ZSt4cout 在函数 _main 中引用
foo-839435.o : 错误 LNK2019: 函数 __ZNSt14error_categoryD0Ev 中引用的未解析的外部符号 __ZdlPv
foo-839435.o : 错误 LNK2019: 函数 __ZNSo6sentry 中引用的未解析的外部符号 __ZSt18uncaught_exceptionv
D2Ev
foo-839435.o:错误 LNK2019:未解析的外部符号 ___cxa_rethrow 在函数 __ZNSt8ios_base5clearEib 中引用
foo-839435.o:错误 LNK2019:函数 __ZNSt8ios_base5clearEib 中引用的未解析的外部符号 ___cxa_allocate_exception
foo-839435.o:错误 LNK2019:函数 __ZNSt8ios_base5clearEib 中引用的未解析的外部符号 ___cxa_throw
foo-839435.o:错误 LNK2019:函数 __ZSt15make_er 中引用的未解析的外部符号 __ZSt17iostream_categoryv
那么我能做些什么呢?