how to use std::filesystem on gcc 8?

前端 未结 3 1365
挽巷
挽巷 2020-12-11 02:29

I have updated version of gcc, gcc --version produces the following output

    gcc (Ubuntu 8.1.0-5ubuntu1~16.04) 8.1.0
Copyright (C) 2018 Free Software Found         


        
3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-11 03:22

    If you are using an IDE, eg codeblocks, then make sure the default compiler flags for gcc: -std=c++17 is set, not just the current project's, but the global flags.

    Had this issue with CB and setting this flag under [Settings/Compiler] fixed it (no need for adding the lib)

提交回复
热议问题