Undefined reference error with new filesystem library and clang++7

前端 未结 1 767
迷失自我
迷失自我 2020-12-20 00:17

I was trying to out the new filesystem STL library, but for some reason am getting errors. The Clang++7 website indicates that it should support th

1条回答
  •  时光说笑
    2020-12-20 00:56

    filesystem is still experimental and requires an extra library.

    If you are using libstdc++, link with -lstdc++fs (or target_link_libraries(${PROJECT_NAME} stdc++fs)).

    For libc++, use -lc++fs (similar for the CMake command).

    0 讨论(0)
提交回复
热议问题