Skip to content

在编译linux的demo时报错 #1939

Answered by domchen
jackTJT asked this question in General
Nov 30, 2023 · 5 comments · 2 replies
Discussion options

You must be logged in to vote

这边问题已经解决,出现std::filesystem报错的原因是因为cmakeList没有对libstdc++fs.a进行配置,不同服务器有不同的默认情况,在有些服务器上是默认不加入libstdc++fs.a的,需要在cmakeList中进行配置

查了一下官网文档:https://gcc.gnu.org/gcc-9/changes.html,GCC 9.0+ 才内置了 C++17 的 filesystem 支持。那我们更新一下 Linux 编译要求吧,提高到 GCC 9.0+。

Replies: 5 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@dophinlife
Comment options

Comment options

You must be logged in to vote
1 reply
@dophinlife
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by domchen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants