Mach-O链接器错误Xcode 5
我刚刚更新我的Xcode到5.0.2版本更新后,我所有以前运行的应用程序(*完美运行和归档)现在给我下面的错误,当我尝试存档他们在我的设备(不连接设备)testing。
Ld /Users/dharammalik/Library/Developer/Xcode/DerivedData/lite_test-hblolzuqyvugvdfpenjeoxvmovrk/Build/Intermediates/ArchiveIntermediates/lite_test/IntermediateBuildFilesPath/lite_test.build/Release-iphoneos/lite_test.build/Objects-normal/armv7s/lite_test normal armv7s cd /Users/dharammalik/Documents/PhonegapWorkspace/lite_test setenv IPHONEOS_DEPLOYMENT_TARGET 5.0 setenv 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 armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -L/Users/dharammalik/Library/Developer/Xcode/DerivedData/lite_test-hblolzuqyvugvdfpenjeoxvmovrk/Build/Intermediates/ArchiveIntermediates/lite_test/BuildProductsPath/Release-iphoneos -F/Users/dharammalik/Library/Developer/Xcode/DerivedData/lite_test-hblolzuqyvugvdfpenjeoxvmovrk/Build/Intermediates/ArchiveIntermediates/lite_test/BuildProductsPath/Release-iphoneos -filelist /Users/dharammalik/Library/Developer/Xcode/DerivedData/lite_test-hblolzuqyvugvdfpenjeoxvmovrk/Build/Intermediates/ArchiveIntermediates/lite_test/IntermediateBuildFilesPath/lite_test.build/Release-iphoneos/lite_test.build/Objects-normal/armv7s/lite_test.LinkFileList -dead_strip -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -all_load -Obj-C -fobjc-link-runtime -miphoneos-version-min=5.0 -framework CoreLocation -framework ImageIO -framework OpenAL -framework AssetsLibrary /Users/dharammalik/Library/Developer/Xcode/DerivedData/lite_test-hblolzuqyvugvdfpenjeoxvmovrk/Build/Intermediates/ArchiveIntermediates/lite_test/BuildProductsPath/Release-iphoneos/libCordova.a -framework Foundation -weak_framework UIKit -framework CoreGraphics -framework AddressBook -framework AddressBookUI -framework AudioToolbox -weak_framework AVFoundation -framework CFNetwork -framework MediaPlayer -framework QuartzCore -framework SystemConfiguration -framework MobileCoreServices -weak_framework CoreMedia -framework CoreLocation -Xlinker -dependency_info -Xlinker /Users/dharammalik/Library/Developer/Xcode/DerivedData/lite_test-hblolzuqyvugvdfpenjeoxvmovrk/Build/Intermediates/ArchiveIntermediates/lite_test/IntermediateBuildFilesPath/lite_test.build/Release-iphoneos/lite_test.build/Objects-normal/armv7s/lite_test_dependency_info.dat -o /Users/dharammalik/Library/Developer/Xcode/DerivedData/lite_test-hblolzuqyvugvdfpenjeoxvmovrk/Build/Intermediates/ArchiveIntermediates/lite_test/IntermediateBuildFilesPath/lite_test.build/Release-iphoneos/lite_test.build/Objects-normal/armv7s/lite_test ld: warning: ignoring file /Users/dharammalik/Library/Developer/Xcode/DerivedData/lite_test-hblolzuqyvugvdfpenjeoxvmovrk/Build/Intermediates/ArchiveIntermediates/lite_test/BuildProductsPath/Release-iphoneos/libCordova.a, file was built for archive which is not the architecture being linked (armv7s): /Users/dharammalik/Library/Developer/Xcode/DerivedData/lite_test-hblolzuqyvugvdfpenjeoxvmovrk/Build/Intermediates/ArchiveIntermediates/lite_test/BuildProductsPath/Release-iphoneos/libCordova.a Undefined symbols for architecture armv7s: "_OBJC_METACLASS_$_CDVCommandDelegateImpl", referenced from: _OBJC_METACLASS_$_MainCommandDelegate in MainViewController.o "_CDVLocalNotification", referenced from: -[AppDelegate application:didReceiveLocalNotification:] in AppDelegate.o "_OBJC_CLASS_$_CDVCommandDelegateImpl", referenced from: _OBJC_CLASS_$_MainCommandDelegate in MainViewController.o "_OBJC_CLASS_$_CDVCommandQueue", referenced from: _OBJC_CLASS_$_MainCommandQueue in MainViewController.o "_OBJC_METACLASS_$_CDVViewController", referenced from: _OBJC_METACLASS_$_MainViewController in MainViewController.o "_OBJC_METACLASS_$_CDVCommandQueue", referenced from: _OBJC_METACLASS_$_MainCommandQueue in MainViewController.o "_CDVPluginHandleOpenURLNotification", referenced from: -[AppDelegate application:handleOpenURL:] in AppDelegate.o "_OBJC_CLASS_$_CDVViewController", referenced from: _OBJC_CLASS_$_MainViewController in MainViewController.o ld: symbol(s) not found for architecture armv7s clang: error: linker command failed with exit code 1 (use -v to see invocation)
试图改变架构,但没有奏效。 任何想法如何解决这些问题? 在我之前的Xcode版本中,它们根本不存在。
从valid architectures
部分删除armv7s
,它将工作。
构build设置 – >体系结构 – >有效的体系结构
更改Buid设置—>体系结构—>仅构build主动架构 —> 是的这解决了我的问题在新的Xcode 5中使用旧的cordova版本
我有同样的问题,问题是我偶然导入一个.m文件,而不是.h在一个实现文件 – 希望它可以帮助
libCordova.a, file was built for archive which is not the architecture being linked (armv7s)
看起来你的libCordova框架的副本不包含armv7s二进制文件。
您需要更改CordovaLib项目中的体系结构,而不是在lite_test项目中。 我认为当你说你尝试改变架构时,你只会在你的项目中尝试,而不是在cordova项目(因为cordova的变化为我工作)。 请记住,Cordova是一个依赖项目,每次运行时都会编译为二进制文件。
- iOS上的PhoneGap具有资源的绝对pathURL?
- 如何在xcode(swift)和phonegap中将iPhone作为背景灯光运行
- 找不到“FacebookSDK / FacebookSDK.h”文件
- iOS PhoneGap的构build失败
- Visual Studio Debugger无法连接到iOS模拟器中的远程Apache Cordova应用程序
- xcode命令行编译失败,com.apple.compilers.llvm.clang.1_0.compiler
- Phonegap IOS – 插件推送设置
- Phonegap使用cordova-plugin-sim获取sim信息
- 使用phonegap将android应用程序转换为IOS?