2012-09-01 31 views
0

我使用Xcode 4,目前我没有任何iDevice能够在我的应用程序中测试加速度计,所以我搜索了一会儿并找到名为“unimotion”的util。读取我为Unimotion文件说:“一个Makefile是包含的,所以你所要做的就是cd到'unimotion'目录并键入'make'。”所以我试了一下,但终端给我留言XCode 4 Unimotion

ls: /Developer/SDKs: No such file or directory cc -Wall -Os -g -isysroot /Developer/SDKs/ -arch i386 -arch ppc -fconstant-cfstrings -c -o unimotion.o unimotion.c clang: warning: not using the clang compiler for the 'powerpc' architecture unimotion.c:72:10: fatal error: 'IOKit/IOKitLib.h' file not found

include IOKit/IOKitLib.h>

1 error generated. make[1]: * [unimotion.o] Error 1 make: * [sub-unimotion] Error 2

一遍又一遍。

那么,我做错了什么?

谢谢。

回答

0

重写所有出现在3个Ma​​kefile文件/Developer/SDKs/(校准/ Makefile文件,运动/ Makefile文件和unimotion/Makefile中)与

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ 

,应该帮助你。如果您使用的Xcode 4,你可能会得到进一步的错误也

llvm-gcc-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-gcc-4.2': execvp: No such file or directory 

-arch ppc不支持存在了。只需删除Makefiles中的每一个-arch ppc即可。