0
votes

For some reason when I build my project I get these error.

Apple Mach-O Linker Error

No such file or directory: '`-lc++'

clang: error: no such file or directory: '`-lc++'

I have tried rebuilding the project many times and I also have cleaned the project many times too. For some reason on my mac if I do that it magically fixes errors sometimes. Here is also more information on the errors.

Ld /Users/bootsie123/Library/Developer/Xcode/DerivedData/IssueExample-covmppdbtzdmuecxicjpccaeojxd/Build/Products/Debug-iphonesimulator/IssueExample.app/IssueExample normal x86_64 cd /Users/bootsie123/Desktop/IssueExample export IPHONEOS_DEPLOYMENT_TARGET=10.1 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.1.sdk -L/Users/bootsie123/Library/Developer/Xcode/DerivedData/IssueExample-covmppdbtzdmuecxicjpccaeojxd/Build/Products/Debug-iphonesimulator -F/Users/bootsie123/Library/Developer/Xcode/DerivedData/IssueExample-covmppdbtzdmuecxicjpccaeojxd/Build/Products/Debug-iphonesimulator -filelist /Users/bootsie123/Library/Developer/Xcode/DerivedData/IssueExample-covmppdbtzdmuecxicjpccaeojxd/Build/Intermediates/IssueExample.build/Debug-iphonesimulator/IssueExample.build/Objects-normal/x86_64/IssueExample.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=10.1 -Xlinker -object_path_lto -Xlinker /Users/bootsie123/Library/Developer/Xcode/DerivedData/IssueExample-covmppdbtzdmuecxicjpccaeojxd/Build/Intermediates/IssueExample.build/Debug-iphonesimulator/IssueExample.build/Objects-normal/x86_64/IssueExample_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -lctemplate-ios -letpan-ios -lxml2 -lsasl2 -liconv -ltidy -lz-lc++ -lresolv -stdlib=libc++ -ObjC /Users/bootsie123/Library/Developer/Xcode/DerivedData/IssueExample-covmppdbtzdmuecxicjpccaeojxd/Build/Products/Debug-iphonesimulator/libMailCore-ios.a -framework Security -framework CFNetwork -Xlinker -dependency_info -Xlinker /Users/bootsie123/Library/Developer/Xcode/DerivedData/IssueExample-covmppdbtzdmuecxicjpccaeojxd/Build/Intermediates/IssueExample.build/Debug-iphonesimulator/IssueExample.build/Objects-normal/x86_64/IssueExample_dependency_info.dat -o /Users/bootsie123/Library/Developer/Xcode/DerivedData/IssueExample-covmppdbtzdmuecxicjpccaeojxd/Build/Products/Debug-iphonesimulator/IssueExample.app/IssueExample

clang: error: no such file or directory: '`-lc++'

1
Looks like some sort of garbage before the dash. Did you edit the linked libraries manually? Try rewriting it. - Per Johansson
Nope. I did not edit the linked libraries. - thebootsie123
@thebootsie123 even tho the answer you provided says otherwise? - Brad Allred
OH. I'm sorry. I read it differently. - thebootsie123

1 Answers

0
votes

Fixed it. It turns out that in the api I'm using I copied and pasted the other linker flags wrong. Making one of them be

`-lc++

When it should have been

-lc++