【发布时间】:2022-12-23 00:47:41
【问题描述】:
编译教科书中的代码示例时,遇到编译错误:ld: library not found for -lstdc++fs。这个错误是什么意思,我该如何解决?
% make filesystem
Consolidate compiler generated dependencies of target filesystem
[100%] Linking CXX executable filesystem
ld: library not found for -lstdc++fs
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [chapter_17/filesystem] Error 1
make[2]: *** [chapter_17/CMakeFiles/filesystem.dir/all] Error 2
make[1]: *** [chapter_17/CMakeFiles/filesystem.dir/rule] Error 2
make: *** [filesystem] Error 2
【问题讨论】: