Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

linking std::experimental::filesystem with Xcode 9

Tags:

xcode

macos

c++17

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.

like image 951
user3717478 Avatar asked Jun 21 '17 16:06

user3717478


1 Answers

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

like image 111
Brendan Shanks Avatar answered Oct 07 '22 01:10

Brendan Shanks