Xcode 10.2现在包括< filesystem>头.但是,在使用std :: filesystem编写代码时,我遇到了很多额外的链接错误.
Undefined symbols for architecture x86_64:
"std::__1::__fs::filesystem::path::__filename() const", referenced from:
std::__1::__fs::filesystem::path::filename() const in dump_zip.cpp.o
std::__1::__fs::filesystem::path::filename() const in libxp_parse.a(zipped.cpp.o)
std::__1::__fs::filesystem::path::remove_filename() in libxp_parse.a(zipped.cpp.o)
std::__1::__fs::filesystem::path::has_filename() const in libxp_parse.a(zipped.cpp.o)
std::__1::__fs::filesystem::path::has_filename() const in libxp_parse.a(acf.cpp.o)
我认为需要为文件系统支持链接一个额外的库,但我无法确定它是什么或在哪里.知道它叫什么吗?
编辑:libc说libc fs是必需的 – 然而,它似乎不与Xcode一起分发,至少不在默认搜索目录中.
解决方法:
Xcode 10.2不包含实现< filesystem>的库支持.它不包含在Xcode 10.2中的原因是< filesystem>的实现.当时没有稳定的ABI.
所以行为是预期的,但是如果错误更明确地说明为什么会发生这种情况会更好.
原文地址:https://codeday.me/bug/20190827/1745134.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。