mac下gcc编译出现问题,求助,在线等
答案:1 悬赏:60 手机版
解决时间 2021-01-24 22:32
- 提问者网友:相思似海深
- 2021-01-24 13:03
mac下gcc编译出现问题,求助,在线等
最佳答案
- 五星知识达人网友:長槍戰八方
- 2021-01-24 13:44
错误提示:
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 >& std::__1::__put_character_sequence >(std::__1::basic_ostream >&, char const*, unsigned long) in Person-c78205.o
"std::__1::ios_base::getloc() const", referenced from:
std::__1::basic_ostream >& std::__1::__put_character_sequence >(std::__1::basic_ostream >&, char const*, unsigned long) in Person-c78205.o
"std::__1::basic_string, std::__1::allocator >::__init(unsigned long, char)", referenced from:
std::__1::ostreambuf_iterator > std::__1::__pad_and_output >(std:
...
---------
//
gcc 开启使用标准c++库即可
比如:
gcc -lstdc++ Person.cpp -o Person
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
"std::__1::ios_base::getloc() const", referenced from:
std::__1::basic_ostream
"std::__1::basic_string
std::__1::ostreambuf_iterator
...
---------
//
gcc 开启使用标准c++库即可
比如:
gcc -lstdc++ Person.cpp -o Person
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯