码迷,mamicode.com
首页 > 系统相关 > 详细

mac gcc 编译错误 基础问题

时间:2016-03-12 01:33:13      阅读:368      评论:0      收藏:0      [点我收藏+]

标签:

mac gcc  Undefined symbols for architecture x86_64 "std::__1:

//

Undefined symbols for architecture x86_64:

  "std::__1::locale::use_facet(std::__1::locale::id&) const", referenced from:

      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in Person-c78205.o

  "std::__1::ios_base::getloc() const", referenced from:

      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in Person-c78205.o

  "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init(unsigned long, char)", referenced from:

      std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> > std::__1::__pad_and_output<char, std::__1::char_traits<char> >(std:

...

---------

//

gcc 开启使用标准c++库即可

比如:

gcc -lstdc++ Person.cpp -o Person

 

mac gcc 编译错误 基础问题

标签:

原文地址:http://www.cnblogs.com/simoncook/p/5267732.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!