【问题标题】:XCode error: linker failedXCode 错误:链接器失败
【发布时间】:2016-01-19 05:19:43
【问题描述】:

我在论坛上看到了更多问题,但找不到合适的答案。

    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)

有人已经解决了这个问题吗?

【问题讨论】:

标签: ios xcode unity3d


【解决方案1】:

您可能会不小心#import 一个 .m 文件而不是一个 .h。使用 Cmd+Shift+F 并搜索“.m”(不带引号)。它很可能属于警告中提到的类别之一。如果没有,请清理并再次运行。

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

或

此错误可能是由于您的项目中缺少某些库。

检查您的构建阶段 -> 将二进制文件与库链接。您的任何框架都可能已从那里删除。

添加它并清理并构建您的项目。它应该可以正常工作。

希望对你有帮助。

【讨论】:

    猜你喜欢
    • 2017-12-20
    • 2016-10-18
    • 2014-02-15
    • 2010-11-25
    • 1970-01-01
    • 2018-06-12
    • 2019-04-28
    • 1970-01-01
    • 2017-10-03
    相关资源
    最近更新 更多