我正在使用 std::experimental::filesystem 和 Xcode 9.0 beta。编译器阶段完成正常,但链接器抱怨未定义的符号:
std::experimental::filesystem::v1::path::__filename() const
std::experimental::filesystem::v1::path::__filename() const
std::experimental::filesystem::v1::path::__stem() const
std::experimental::filesystem::v1::__status(std::experimental::filesystem::v1::path const&, std::__1::error_code*)
我也在使用 std::experimental::filesystem::canonical(),但链接器并没有抱怨缺少它。
如何配置项目以包含这些缺失的引用?
UPDATE:
我一直在尝试一个更简单的程序。如果我只使用 canonical() 那么链接器会抱怨它丢失了。
我可以使用 std::experimental::Optional - 一切都可以编译、链接并运行正常。但“可选”是一个模板,因此可能不涉及库。
您是否使用任何编译-std=
选项(Xcode 中的“C++ Language Dialect”选项)?
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)