简体   繁体   中英

XCode error: linker failed

I saw more questions on forum but could not find appropriate answers.

    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)

Did anybody already solve this problem?

You may be accidentally #import'ing a .m file instead of a .h. Use Cmd+Shift+F and search for ".m" (without quotes). It will most likely lie in one of the classes mentioned in the warning. If not, clean and run again.

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

or

This error may be because of some missing libraries in your project.

Check in your Build Phases -> Link Binary With Libraries. Any of your framework may had been removed from there.

Add it and Clean and Build your project. It should work fine.

Hope it helps you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM