ld: library not found for -lstdc++fs

make command is failing with the below mentioned lines. Can someone please help me with this? Thanks!

ld: library not found for -lstdc++fs

clang: error: linker command failed with exit code 1 (use -v to see invocation)

Below are the list of gcc and clang versions.

Target: x86_64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
(base) rmagesh@Mageshs-MacBook-Pro src % gcc -v
Apple clang version 14.0.0 (clang-1400.0.29.102)
Target: x86_64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
(base) rmagesh@Mageshs-MacBook-Pro src % clang++ -c
clang: error: no input files
(base) rmagesh@Mageshs-MacBook-Pro src % clang++ -v
Apple clang version 14.0.0 (clang-1400.0.29.102)
Target: x86_64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
(base) rmagesh@Mageshs-MacBook-Pro src % clang -v  
Apple clang version 14.0.0 (clang-1400.0.29.102)
Target: x86_64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
(base) rmagesh@Mageshs-MacBook-Pro src % `

My understanding is that stdc++fs is a GCC-ism, and you seem to be using Clang. If you remove the -lstdc++fs option, what happens?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

ld: library not found for -lstdc++fs
 
 
Q