簡體   English   中英

XCode錯誤:鏈接器失敗

[英]XCode error: linker failed

我在論壇上看到了更多問題,但找不到合適的答案。

    Ld /Users/gbnuser/Library/Developer/Xcode/DerivedData/Unity-iPhone-cdjcxjclijkdujesogrzhecyfbrp/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/dragonsimfull normal armv7
    cd /Users/gbnuser/Desktop/xCode_projects/DragonSim_Full_v1.0
    export IPHONEOS_DEPLOYMENT_TARGET=6.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -L/Users/gbnuser/Library/Developer/Xcode/DerivedData/Unity-iPhone-cdjcxjclijkdujesogrzhecyfbrp/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/BuildProductsPath/Release-iphoneos -L/Users/gbnuser/Desktop/xCode_projects/DragonSim_Full_v1.0 -L/Users/gbnuser/Desktop/xCode_projects/DragonSim_Full_v1.0/Libraries -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/lib/system -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/lib/system/introspection -F/Users/gbnuser/Library/Developer/Xcode/DerivedData/Unity-iPhone-cdjcxjclijkdujesogrzhecyfbrp/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/BuildProductsPath/Release-iphoneos -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -filelist /Users/gbnuser/Library/Developer/Xcode/DerivedData/Unity-iPhone-cdjcxjclijkdujesogrzhecyfbrp/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/dragonsimfull.LinkFileList -Xlinker -no_pie -Xlinker -map -Xlinker /Users/gbnuser/Library/Developer/Xcode/DerivedData/Unity-iPhone-cdjcxjclijkdujesogrzhecyfbrp/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/dragonsimfull-LinkMap-normal-armv7.txt -dead_strip -weak_framework CoreMotion -weak-lSystem -stdlib=libc++ -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=6.0 -framework DTPerformanceSession -framework InterfaceBuilderKit -framework SenTestingKit -framework Accelerate -framework Accounts -framework AddressBook -framework AddressBookUI -framework AdSupport -framework AssetsLibrary -framework AudioUnit -framework AVKit /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/lib/bundle1.o /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/lib/CarrierBundleUtilities.dylib -framework CoreAudio -framework CoreAudioKit -framework CoreBluetooth -framework CoreData -framework CoreFoundation -framework CoreImage -framework CoreMIDI -framework CoreTelephony /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/lib/crt1.3.1.o /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/lib/crt1.o /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/lib/dylib1.o -framework EventKit -framework EventKitUI -framework GameController /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/lib/gcrt1.o -framework GLKit -framework GSS -framework HealthKit -framework ImageIO -framework JavaScriptCore /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/usr/lib/lazydylib1.o -framework LocalAuthentication -framework MapKit -framework MediaAccessibility -framework MediaToolbox -framework MessageUI -framework Metal -framework MobileCoreServices -framework MultipeerConnectivity -framework NewsstandKit -framework NotificationCenter -framework Photos -framework PhotosUI -framework PushKit -framework QuickLook -framework SafariServices -framework SceneKit -framework Security -framework Social -framework SpriteKit -framework Twitter -framework VideoToolbox -framework WatchKit -framework WebKit -framework AudioToolbox -weak_framework AVFoundation -framework CFNetwork -framework CoreGraphics -framework CoreLocation -framework CoreMedia -weak_framework CoreMotion -framework CoreText -framework CoreVideo -framework Foundation -framework GameKit -weak_framework iAd -liconv.2 -framework MediaPlayer -framework OpenAL -framework OpenGLES -framework QuartzCore -framework SystemConfiguration -framework UIKit -liPhone-lib -Xlinker -dependency_info -Xlinker /Users/gbnuser/Library/Developer/Xcode/DerivedData/Unity-iPhone-cdjcxjclijkdujesogrzhecyfbrp/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/dragonsimfull_dependency_info.dat -o /Users/gbnuser/Library/Developer/Xcode/DerivedData/Unity-iPhone-cdjcxjclijkdujesogrzhecyfbrp/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/dragonsimfull

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

有人已經解決了這個問題嗎?

您可能不小心#import導入了.m文件而不是.h文件。 使用Cmd + Shift + F並搜索“ .m”(不帶引號)。 它很可能位於警告中提到的類別之一。 如果不是,請清潔並再次運行。

/////////////////////////

要么

該錯誤可能是由於項目中缺少某些庫而引起的。

檢入構建階段->將二進制文件與庫鏈接。 您的任何框架都可能已從此處刪除。

添加它並清理並構建您的項目。 它應該工作正常。

希望對您有幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM