2011年12月8日木曜日

CMMotionのエラーについて

CMMotion関係のコーディングをして実行したところ

Apple Mach-O Linker Error

Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_CMMotionManager", referenced from:
      objc-class-ref in MainViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

というエラーが出て、ビルドができないことにずいぶんとはまりました。

文法的にも問題ないのに。。とおもっていたら
CoreMotion.frameworkを追加するのを忘れていました(@@)
CoreMotion.frameworkを追加してビルドすると、ちゃんとビルドできるようになります

No response to “CMMotionのエラーについて”

Leave a Reply