叮当++ - 致命错误:“bits/c”“config.h”找不到文件
我正在使用从源代码编译的 clang 2.9,当我尝试编译这样的简单代码时:
#include <iostream>
int main (){
std::cout << "Hello\n";
}
我收到错误:
/usr/include/c++/4.5/string:39:10: fatal error: 'bits/c++config.h' file not found
当我包含 /usr/include/c++/4.5/i686-linux-gnu
,我
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: cannot find crtbegin.o: No such file or directory
/usr/bin/ld: cannot find -lstdc++
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: cannot find -lgcc
clang: error: linker command failed with exit code 1 (use -v to see invocation)
对如何解决这个问题有什么想法吗?
I'm using clang 2.9, compiled from source and when I try to compile a simple code like this:
#include <iostream>
int main (){
std::cout << "Hello\n";
}
I get the error:
/usr/include/c++/4.5/string:39:10: fatal error: 'bits/c++config.h' file not found
When I include /usr/include/c++/4.5/i686-linux-gnu
, I get
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: cannot find crtbegin.o: No such file or directory
/usr/bin/ld: cannot find -lstdc++
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: cannot find -lgcc
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any ideas on how to solve this one?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论