在使用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中?
发布于 2020-11-05 06:52:41
TOOLCHAIN_TARGET_TASK_append = " libstdc++-staticdev"
https://stackoverflow.com/questions/64677233
复制