#include <iostream>using std::cout; using std::endl;/* hello world.cpp */int main(){ cout << "Hello,world!" << endl; return 0;}
在命令行我做了:clang helloworld.cpp和我得到以下很好的错误:
Undefined symbols for architecture x86_64: "std::ios_base::Init::~Init()",referenced from: ___cxx_global_var_init in cc-4iziZq.o "std::ios_base::Init::Init()",referenced from: ___cxx_global_var_init in cc-4iziZq.o "std::basic_ostream<char,std::char_traits<char> >& std::endl<char,std::char_traits<char> >(std::basic_ostream<char,std::char_traits<char> >&)",referenced from: _main in cc-4iziZq.o "std::cout",referenced from: _main in cc-4iziZq.o "std::basic_ostream<char,std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char,std::char_traits<char> >&,char const*)",referenced from: _main in cc-4iziZq.o "std::ostream::operator<<(std::ostream& (*)(std::ostream&))",referenced from: _main in cc-4iziZq.old: symbol(s) not found for architecture x86_64clang: error: linker command Failed with exit code 1 (use -v to see invocation)
哪里不对?
谢谢!
-kstruct
以上是内存溢出为你收集整理的c – clang iostream – 没有找到符号全部内容,希望文章能够帮你解决c – clang iostream – 没有找到符号所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)