Apple Mach-O链接器错误,没有这样的文件或目录:'`Ic ++'

时间:2017-02-04 21:19:37

标签: xcode

出于某种原因,当我构建项目时,我收到了这些错误。

  

Apple Mach-O链接器错误

     

没有这样的文件或目录:'`-lc ++'

     

clang:错误:没有这样的文件或目录:'`-lc ++'

我尝试过多次重建项目,并且我也多次清理过该项目。出于某种原因,如果我这样做,它有时会神奇地修复错误。以下是有关错误的更多信息。

  

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 /箱:在/ 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/调试-I phonesimulator / 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:错误:没有这样的文件或目录:'`-lc ++'

1 个答案:

答案 0 :(得分:0)

修正了它。事实证明,在api我使用我复制并粘贴其他链接器标志错误。让其中一个成为

  

`-lc ++

什么时候应该

  

-lc ++