Why do I get "file is not of required architecture" when I try to build my app on an iphone?
Posted
by Dale
on Stack Overflow
See other posts from Stack Overflow
or by Dale
Published on 2009-09-25T21:12:51Z
Indexed on
2010/05/30
1:02 UTC
Read the original article
Hit count: 420
iphone
My app seemingly runs fine in the simulator but the first time I hooked a phone up to my system and had it build for it I got a huge error log with things like:
Build SCCUI of project SCCUI with configuration Debug
CompileXIB HandleAlert.xib
cd /Users/gdbriggs/Desktop/SCCUI
setenv IBC_MINIMUM_COMPATIBILITY_VERSION 3.1
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr
/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile
/Users/gdbriggs/Desktop/SCCUI/build/Debug-iphoneos/SCCUI.app/HandleAlert.nib /Users/gdbriggs/Desktop/SCCUI/HandleAlert.xib
/* com.apple.ibtool.document.warnings */
/Users/gdbriggs/Desktop/SCCUI/HandleAlert.xib:13: warning: UITextView does not support data detectors when the text view is editable.
Ld build/Debug-iphoneos/SCCUI.app/SCCUI normal armv6
cd /Users/gdbriggs/Desktop/SCCUI
setenv IPHONEOS_DEPLOYMENT_TARGET 3.1
setenv MACOSX_DEPLOYMENT_TARGET 10.5
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.sdk -L/Users/gdbriggs/Desktop/SCCUI/build/Debug-iphoneos -F/Users/gdbriggs/Desktop/SCCUI/build/Debug-iphoneos -F/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/System/Library/Frameworks -filelist /Users/gdbriggs/Desktop/SCCUI/build/SCCUI.build/Debug-iphoneos/SCCUI.build/Objects-normal/armv6/SCCUI.LinkFileList -mmacosx-version-min=10.5 -dead_strip -miphoneos-version-min=3.1 -framework Foundation -framework UIKit -framework CoreGraphics -framework MessageUI -o /Users/gdbriggs/Desktop/SCCUI/build/Debug-iphoneos/SCCUI.app/SCCUI
ld: warning: in /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/System/Library/Frameworks/Foundation.framework/Foundation, file is not of required architecture
ld: warning: in /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/System/Library/Frameworks/UIKit.framework/UIKit, file is not of required architecture
ld: warning: in /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics, file is not of required architecture
ld: warning: in /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/System/Library/Frameworks/MessageUI.framework/MessageUI, file is not of required architecture
Undefined symbols:
"_OBJC_CLASS_$_UIDevice", referenced from:
__objc_classrefs__DATA@0 in SCAuthenticationHandler.o
"_OBJC_CLASS_$_NSString", referenced from:
__objc_classrefs__DATA@0 in CCProxy.o
__objc_classrefs__DATA@0 in AlertSummaryViewController.o
__objc_classrefs__DATA@0 in HomeLevelController.o
__objc_classrefs__DATA@0 in SCAuthenticationHandler.o
__objc_classrefs__DATA@0 in SCRequestHandler.o
"_UIApplicationMain", referenced from:
_main in main.o
"_objc_msgSend", referenced from:
_main in main.o
_main in main.o
_main in main.o
-[SCCUIAppDelegate applicationDidFinishLaunching:] in
and it just keeps going.
At / near the bottom it says:
ld: symbol(s) not found
collect2: ld returned 1 exit status
What am I doing wrong?
© Stack Overflow or respective owner