2012-09-01 33 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即可。