clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)Xcode 9

时间:2017-10-03 14:52:21

标签: ios xcode

我在尝试存档我的应​​用程序的新版本时遇到错误,我无法说明它的来源以及如何修复它。

  

clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)

这里的整个错误:

Ld /Users/adrianvidican/Library/Developer/Xcode/DerivedData/app-dkxsgphkoxkxumbswtcudmwodhqz/Build/Products/Debug-iphonesimulator/app.app/app normal x86_64
cd /Users/adrianvidican/Downloads/MessengerX.1
export IPHONEOS_DEPLOYMENT_TARGET=9.3
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/iPhoneSimulator11.0.sdk -L/Users/adrianvidican/Library/Developer/Xcode/DerivedData/app-dkxsgphkoxkxumbswtcudmwodhqz/Build/Products/Debug-iphonesimulator -L/Users/adrianvidican/Library/Developer/Xcode/DerivedData/app-dkxsgphkoxkxumbswtcudmwodhqz/Build/Products/Debug-iphonesimulator/Bolts -L/Users/adrianvidican/Library/Developer/Xcode/DerivedData/app-dkxsgphkoxkxumbswtcudmwodhqz/Build/Products/Debug-iphonesimulator/FBSDKCoreKit -L/Users/adrianvidican/Library/Developer/Xcode/DerivedData/app-dkxsgphkoxkxumbswtcudmwodhqz/Build/Products/Debug-iphonesimulator/FBSDKLoginKit -L/Users/adrianvidican/Library/Developer/Xcode/DerivedData/app-dkxsgphkoxkxumbswtcudmwodhqz/Build/Products/Debug-iphonesimulator/GTMOAuth2 -L/Users/adrianvidican/Library/Developer/Xcode/DerivedData/app-dkxsgphkoxkxumbswtcudmwodhqz/Build/Products/Debug-iphonesimulator/GTMSessionFetcher -L/Users/adrianvidican/Library/Developer/Xcode/DerivedData/app-dkxsgphkoxkxumbswtcudmwodhqz/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac -L/Users/adrianvidican/Library/Developer/Xcode/DerivedData/app-dkxsgphkoxkxumbswtcudmwodhqz/Build/Products/Debug-iphonesimulator/IQAudioRecorderController -L/Users/adrianvidican/Library/Developer/Xcode/DerivedData/app-dkxsgphkoxkxumbswtcudmwodhqz/Build/Products/Debug-iphonesimulator/JSQMessagesViewController -L/Users/adrianvidican/Library/Developer/Xcode/DerivedData/app-dkxsgphkoxkxumbswtcudmwodhqz/Build/Products/Debug-iphonesimulator/JSQSystemSoundPlayer -L/Users/adrianvidican/Library/Developer/Xcode/DerivedData/app-dkxsgphkoxkxumbswtcudmwodhqz/Build/Products/Debug-iphonesimulator/MBProgressHUD -L/Users/adrianvidican/Library/Developer/Xcode/DerivedData/app-dkxsgphkoxkxumbswtcudmwodhqz/Build/Products/Debug-iphonesimulator/MGSwipeTableCell -L/Users/adrianvidican/Library/Developer/Xcode/DerivedData/app-dkxsgphkoxkxumbswtcudmwodhqz/Build/Products/Debug-iphonesimulator/ProgressHUD -L/Users/adrianvidican/Library/Developer/Xcode/DerivedData/app-dkxsgphkoxkxumbswtcudmwodhqz/Build/Products/Debug-iphonesimulator/RNCryptor-objc -L/Users/adrianvidican/Library/Developer/Xcode/DerivedData/app-dkxsgphkoxkxumbswtcudmwodhqz/Build/Products/Debug-iphonesimulator/RNGridMenu -L/Users/adrianvidican/Library/Developer/Xcode/DerivedData/app-dkxsgphkoxkxumbswtcudmwodhqz/Build/Products/Debug-iphonesimulator/Reachability -L/Users/adrianvidican/Library/Developer/Xcode/DerivedData/app-dkxsgphkoxkxumbswtcudmwodhqz/Build/Products/Debug-iphonesimulator/Realm -L/Users/adrianvidican/Library/Developer/Xcode/DerivedData/app-dkxsgphkoxkxumbswtcudmwodhqz/Build/Products/Debug-iphonesimulator/SCSiriWaveformView -L/Users/adrianvidican/Downloads/MessengerX.1/Pods/Realm/core -F/Users/adrianvidican/Library/Developer/Xcode/DerivedData/app-dkxsgphkoxkxumbswtcudmwodhqz/Build/Products/Debug-iphonesimulator -F/Users/adrianvidican/Downloads/MessengerX.1/Pods/Crashlytics/iOS -F/Users/adrianvidican/Downloads/MessengerX.1/Pods/Fabric/iOS -F/Users/adrianvidican/Downloads/MessengerX.1/Pods/FirebaseAnalytics/Frameworks -F/Users/adrianvidican/Downloads/MessengerX.1/Pods/FirebaseAuth/Frameworks -F/Users/adrianvidican/Downloads/MessengerX.1/Pods/FirebaseCore/Frameworks -F/Users/adrianvidican/Downloads/MessengerX.1/Pods/FirebaseDatabase/Frameworks -F/Users/adrianvidican/Downloads/MessengerX.1/Pods/FirebaseInstanceID/Frameworks -F/Users/adrianvidican/Downloads/MessengerX.1/Pods/FirebaseStorage/Frameworks -F/Users/adrianvidican/Downloads/MessengerX.1/Pods/GoogleSignIn/Frameworks -F/Users/adrianvidican/Downloads/MessengerX.1/Pods/OneSignal/iOS_SDK/Framework -F/Users/adrianvidican/Downloads/MessengerX.1/Pods/SinchRTC -filelist /Users/adrianvidican/Library/Developer/Xcode/DerivedData/app-dkxsgphkoxkxumbswtcudmwodhqz/Build/Intermediates.noindex/app.build/Debug-iphonesimulator/app.build/Objects-normal/x86_64/app.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=9.3 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/adrianvidican/Library/Developer/Xcode/DerivedData/app-dkxsgphkoxkxumbswtcudmwodhqz/Build/Intermediates.noindex/app.build/Debug-iphonesimulator/app.build/Objects-normal/x86_64/app_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -ObjC -lBolts -lFBSDKCoreKit -lFBSDKLoginKit -lGTMOAuth2 -lGTMSessionFetcher -lGoogleToolboxForMac -lIQAudioRecorderController -lJSQMessagesViewController -lJSQSystemSoundPlayer -lMBProgressHUD -lMGSwipeTableCell -lProgressHUD -lRNCryptor-objc -lRNGridMenu -lReachability -lRealm -lSCSiriWaveformView -lc++ -licucore -lrealmcore-ios -lsqlite3 -lz -framework AVFoundation -framework Accelerate -framework AudioToolbox -framework CFNetwork -framework CoreGraphics -framework CoreLocation -framework CoreMedia -framework CoreText -framework CoreVideo -framework Crashlytics -framework Fabric -framework FirebaseAnalytics -framework FirebaseAuth -framework FirebaseCore -framework FirebaseDatabase -framework FirebaseInstanceID -framework FirebaseStorage -framework Foundation -framework GLKit -framework GoogleSignIn -framework MapKit -framework MobileCoreServices -framework OneSignal -framework OpenGLES -framework QuartzCore -framework SafariServices -framework Security -framework Sinch -framework StoreKit -framework SystemConfiguration -framework UIKit -framework VideoToolbox -weak_framework Accounts -weak_framework AudioToolbox -weak_framework CoreGraphics -weak_framework CoreLocation -weak_framework Foundation -weak_framework QuartzCore -weak_framework Security -weak_framework Social -weak_framework UIKit -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/adrianvidican/Library/Developer/Xcode/DerivedData/app-dkxsgphkoxkxumbswtcudmwodhqz/Build/Intermediates.noindex/app.build/Debug-iphonesimulator/app.build/app.app.xcent -framework PushKit -lPods-app -framework MessageUI -Xlinker -dependency_info -Xlinker /Users/adrianvidican/Library/Developer/Xcode/DerivedData/app-dkxsgphkoxkxumbswtcudmwodhqz/Build/Intermediates.noindex/app.build/Debug-iphonesimulator/app.build/Objects-normal/x86_64/app_dependency_info.dat -o /Users/adrianvidican/Library/Developer/Xcode/DerivedData/app-dkxsgphkoxkxumbswtcudmwodhqz/Build/Products/Debug-iphonesimulator/app.app/app

 ld: framework not found Sinch
 clang: error: linker command failed with exit code 1 (use -v to see invocation)

4 个答案:

答案 0 :(得分:1)

你可以尝试删除所有内容:

/用户/ yourUsername /库/开发商/ Xcode中/ DerivedData

并重建。这对我有用。

答案 1 :(得分:0)

让我们进行练习并尝试:

  1. Cmd + Shift + K
  2. Cmd + Shift + Alt / Option + K
  3. 构建

答案 2 :(得分:0)

如果您已将应用转换为swift 4并具有依赖性,则有时您会得到此信息。如果您已添加任何pod或框架,请转到它们,并在构建设置中搜索swift语言并将其设置为3.2。

可能是您的框架尚未更新以使用swift 4

enter image description here

答案 3 :(得分:0)

通过删除我的项目和文件夹中的所有Sinch框架,删除DerivedData中的所有内容,清理项目来修复我的问题。.从Sinch站点下载新版本并安装...退出Xcode ..并重新启动Xcode。运行并构建。