linking std::experimental::filesystem with Xcode 9

孤街醉人 提交于 2019-11-30 05:07:44

问题


I am using std::experimental::filesystem with Xcode 9.0 beta. The compiler phase completes OK but the linker complains of undefined symbols:

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*)

I am also using std::experimental::filesystem::canonical(), but the linker isn't complaining about that being missing.

How can I configure the project to include these missing references?

UPDATE:

I have been experimenting with a simpler program. If I just use canonical() then the linker complains that it is missing.

I can use std::experimental::optional - everything compiles, links and runs OK. But 'optional' is a template and so probably doesn't involve a library.


回答1:


Are you compiling with any -std= option ("C++ Language Dialect" option in Xcode)?



来源:https://stackoverflow.com/questions/44681703/linking-stdexperimentalfilesystem-with-xcode-9

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!