Chris
Chris

Reputation: 1027

Cannot link filesystem library in SDK

I am trying to use the filesystem library from C++17 while compiling with SDK. I used this example.

#include <string>
#include <filesystem>

int main() {
    const std::string path = "/tmp/";
    for (const auto & entry : std::filesystem::directory_iterator(path))
        std::cout << entry.path() << std::endl;
}

I have a problem when linking the library (only while compiling with SDK, it works on Ubuntu.)
Should I enable c++17 for SDK somehow?
Or should I add stdc++fs library to the SDK?

Upvotes: 2

Views: 614

Answers (1)

Oleksandr Kravchuk
Oleksandr Kravchuk

Reputation: 6327

TOOLCHAIN_TARGET_TASK_append = " libstdc++-staticdev"

Upvotes: 3

Related Questions