iOS開発のド初心者ながら、romo SDKで開発しようとしてsdkのサンプルプロジェクトをビルドしようとしたらエラーになったのでメモ。
##環境
- OS X 10.9
- Xcode6.0
- RomoSDK1.0
##エラー内容
色々調べたけど分からんかった。
Ld /Users/sugawara_ryosuke/Library/Developer/Xcode/DerivedData/HelloRMCore-gppdnygudvnlhveeuuydyhglfcux/Build/Products/Debug-iphonesimulator/HelloRMCore.app/HelloRMCore normal x86_64
cd /Users/sugawara_ryosuke/Downloads/RomoSDK_v1.0C/examples/HelloRMCore
export IPHONEOS_DEPLOYMENT_TARGET=6.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.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 x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -L/Users/sugawara_ryosuke/Library/Developer/Xcode/DerivedData/HelloRMCore-gppdnygudvnlhveeuuydyhglfcux/Build/Products/Debug-iphonesimulator -F/Users/sugawara_ryosuke/Library/Developer/Xcode/DerivedData/HelloRMCore-gppdnygudvnlhveeuuydyhglfcux/Build/Products/Debug-iphonesimulator -F../../frameworks -F../../frameworks/RMCharacter.bundle -filelist /Users/sugawara_ryosuke/Library/Developer/Xcode/DerivedData/HelloRMCore-gppdnygudvnlhveeuuydyhglfcux/Build/Intermediates/HelloRMCore.build/Debug-iphonesimulator/HelloRMCore.build/Objects-normal/x86_64/HelloRMCore.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.0 -framework UIKit -framework Foundation -framework CoreGraphics -framework ExternalAccessory -framework RMCore -framework CoreMotion -framework QuartzCore -Xlinker -dependency_info -Xlinker /Users/sugawara_ryosuke/Library/Developer/Xcode/DerivedData/HelloRMCore-gppdnygudvnlhveeuuydyhglfcux/Build/Intermediates/HelloRMCore.build/Debug-iphonesimulator/HelloRMCore.build/Objects-normal/x86_64/HelloRMCore_dependency_info.dat -o /Users/sugawara_ryosuke/Library/Developer/Xcode/DerivedData/HelloRMCore-gppdnygudvnlhveeuuydyhglfcux/Build/Products/Debug-iphonesimulator/HelloRMCore.app/HelloRMCore
ld: warning: ignoring file ../../frameworks/RMCore.framework/RMCore, missing required architecture x86_64 in file ../../frameworks/RMCore.framework/RMCore (3 slices)
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_RMCore", referenced from:
objc-class-ref in ViewController.o
"_OBJC_CLASS_$_RMCoreRobotRomo3", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
- 知人曰く、arm64 x86_64とかエラーが出てたのでiPhone5まで32bitOSでiPhone5sからが64bitOSな設計になってるとかなんとか...
build targetをiPhone5以前のものにするとエラー解消しました。
iPhone5sや6でもbuildする方法
- Build Settings -> Architectures -> ArchitecturesでOtherを選択
$(ARCHS_STANDARD)
って書いてあると思うのですが、その項目を削除してarmv7
と入力しましょう。
Architecruersがarmv7の状態でbuildするとiPhone5s(ちなみにiOS8)でも動きました!
よっしゃ!
##謝辞
@web_chiro さんありがとう。