SDK 中无法 link 文件系统库
Cannot link filesystem library in SDK
我在使用 SDK 进行编译时尝试使用 C++17 中的文件系统库。
我用了 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;
}
链接库时出现问题(仅在使用 SDK 编译时,它适用于 Ubuntu。)
我应该以某种方式为 SDK 启用 c++17 吗?
或者我应该将 stdc++fs 库添加到 SDK?
TOOLCHAIN_TARGET_TASK_append = " libstdc++-staticdev"
我在使用 SDK 进行编译时尝试使用 C++17 中的文件系统库。 我用了 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;
}
链接库时出现问题(仅在使用 SDK 编译时,它适用于 Ubuntu。)
我应该以某种方式为 SDK 启用 c++17 吗?
或者我应该将 stdc++fs 库添加到 SDK?
TOOLCHAIN_TARGET_TASK_append = " libstdc++-staticdev"