未定义的引用`std::filesystem::__cxx11

问题描述 投票:0回答:1

我的 gcc 版本是 9.4.0、Clang 7.0.1 和 C++17。

#include <filesystem>

namespace fs = std::filesystem;

int main()
{
  auto const path_of_friend = fs::absolute( "path/friend" );
}

我收到错误“未定义对 `std::filesystem::absolute 的引用”。 我必须做什么?

reference undefined
1个回答
0
投票

我遇到了同样的问题,我发现了这个:https://github.com/azerothcore/azerothcore-wotlk/issues/6889#issuecomment-878552846.

看起来某些发行版需要

stdc++fs

© www.soinside.com 2019 - 2024. All rights reserved.