2009-09-02 28 views
1

Write native iPhone applications using Eclipse CDT How Windows and Linux developers can bypass the iPhone SDK and write iPhone apps using open source tools」 由PJ卡布雷拉([email protected]大廈iPhone針對WindowsXP使用Cygwin

我是從這個文件中的說明,並認爲我做到了很遠,但我得到一個錯誤,並想知道如果你知道發生了什麼事情。

當我輸入命令時,它開始編譯。大約30分鐘後,我發現你在下面看到的錯誤。 ./make-toolchain.sh

以下是錯誤:

test -d po || mkdir po 
checking whether getopt is declared... /cygdrive/c/downloads/mono/Mono-2.4/bin/m 
sgfmt --statistics -o po/be.gmo /cygdrive/c/projects/tools/home/iphone-2.0-toolc 
hain/src/gcc/libcpp/po/be.po 
c:\downloads\mono\Mono-2.4\bin\msgfmt.exe: error while opening "/cygdrive/c/proj 
ects/tools/home/iphone-2.0-toolchain/src/gcc/libcpp/po/be.po" for reading: No su 
ch file or directory 
make[2]: *** [po/be.gmo] Error 1 
make[2]: Leaving directory `/cygdrive/c/projects/tools/home/iphone-2.0-toolchain 
/build/gcc-4.2-iphone/libcpp' 
make[1]: *** [all-libcpp] Error 2 
make[1]: *** Waiting for unfinished jobs.... 
no 
checking whether clock is declared... yes 
checking whether getpagesize is declared... yes 
checking whether clearerr_unlocked is declared... no 
checking whether feof_unlocked is declared... no 
checking whether ferror_unlocked is declared... no 
checking whether fflush_unlocked is declared... no 
checking whether fgetc_unlocked is declared... no 
checking whether fgets_unlocked is declared... no 
checking whether fileno_unlocked is declared... no 
checking whether fprintf_unlocked is declared... no 
checking whether fputc_unlocked is declared... no 
checking whether fputs_unlocked is declared... no 
checking whether fread_unlocked is declared... no 
checking whether fwrite_unlocked is declared... no 
checking whether getchar_unlocked is declared... yes 
checking whether getc_unlocked is declared... yes 
checking whether putchar_unlocked is declared... yes 
checking whether putc_unlocked is declared... yes 
checking whether getrlimit is declared... yes 
checking whether setrlimit is declared... yes 
checking whether getrusage is declared... yes 
checking whether ldgetname is declared... no 
checking whether times is declared... yes 
checking whether sigaltstack is declared... no 
checking for struct tms... yes 
checking for clock_t... yes 
checking for .preinit_array/.init_array/.fini_array support... no 
checking if mkdir takes one argument... no 
For real value is 
For real value is 
Using `/cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/gcc/config/arm/arm.c' for machine-specific logic. 
Using `/cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/gcc/config/' 
for machine-specific C++ logic. 
Using `/cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/gcc/config/a 
rm/arm.md' as machine description file. 
Using the following target machine macro files: 
     /cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/gcc/config/arm/arm.h 
     /cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/gcc/config/darwin.h 
     /cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/gcc/config/darwin9.h 
     /cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/gcc/config/arm/darwin.h 
     /cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/gcc/config/arm/darwin.h 
Using `/cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/gcc/config/i386/xm-cygwin.h' as host machine macro file. 

Using host-cygwin.o for host machine hooks. 
checking whether NLS is requested... yes 
checking for catalogs to be installed... be ca da de el es fr ja nl ru rw sr sv 
tr zh_CN zh_TW 
checking for library containing RegOpenKeyExA... no 
checking what assembler to use... /usr/local/bin/arm-apple-darwin9-as 
checking what linker to use... /usr/local/bin/arm-apple-darwin9-ld 
checking for arm-apple-darwin9-nm... /usr/local/bin/arm-apple-darwin9-nm 
checking what nm to use... /usr/local/bin/arm-apple-darwin9-nm 
checking for arm-apple-darwin9-objdump... no 
checking what objdump to use... not found 
checking assembler for .balign and .p2align... no 
checking assembler for .p2align with maximum skip... yes 
checking assembler for .literal16... yes 
checking assembler for working .subsection -1... no 
checking assembler for .weak... no 
checking assembler for .weakref... no 
checking assembler for .nsubspa comdat... no 
checking assembler for .hidden... no 
checking linker for .hidden support... no 
checking assembler for .sleb128 and .uleb128... no 
checking assembler for eh_frame optimization... no 
checking assembler for section merging support... no 
checking assembler for section merging support... (cached) no 
checking assembler for COMDAT group support... no 
checking assembler for COMDAT group support... no 
checking assembler for thread-local storage support... no 
checking linker -Bstatic/-Bdynamic option... no 
checking assembler for dwarf2 debug_line support... no 
checking assembler for buggy dwarf2 .file directive... no 
checking assembler for --gdwarf2 option... no 
checking assembler for --gstabs option... yes 
checking linker read-only and read-write section mixing... unknown 
checking linker PT_GNU_EH_FRAME support... no 
checking linker position independent executable support... no 
checking linker --as-needed support... no 
checking linker --sysroot support... no 
checking __stack_chk_fail in target C library... checking for __stack_chk_fail.. 
. no 
no __stack_chk_fail on this target 
no 
Using ggc-page for garbage collection. 
checking whether to enable maintainer-specific portions of Makefiles... no 
Links are now set up to build a cross-compiler 
from i686-pc-cygwin to arm-apple-darwin9. 
updating cache ./config.cache 
configure: creating ./config.status 
config.status: creating Makefile 
config.status: creating gccbug 
config.status: creating mklibgcc 
config.status: creating libada-mk 
config.status: creating ada/Makefile 
config.status: creating auto-host.h 
config.status: executing default commands 
make[1]: Leaving directory `/cygdrive/c/projects/tools/home/iphone-2.0-toolchain 
/build/gcc-4.2-iphone' 
make: *** [all] Error 2 

This script requires that you enter the proper administrator password 
in order to install gcc-4.2-iphone in /usr/local 

make[1]: Entering directory `/cygdrive/c/projects/tools/home/iphone-2.0-toolchai 
n/build/gcc-4.2-iphone' 

/bin/sh /cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/mkinstalldirs /usr/local /usr/local 

make[2]: Entering directory `/cygdrive/c/projects/tools/home/iphone-2.0-toolchain/build/gcc-4.2-iphone/fixincludes' 

rm -rf /usr/local/libexec/gcc/arm-apple-darwin9/4.2.1/install-tools 
/bin/sh /cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/fixincludes 
/../mkinstalldirs /usr/local/libexec/gcc/arm-apple-darwin9/4.2.1/install-tools 

mkdir -p -- /usr/local/libexec/gcc/arm-apple-darwin9/4.2.1/install-tools 
/bin/sh /cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/fixincludes 
/../mkinstalldirs /usr/local/lib/gcc/arm-apple-darwin9/4.2.1/install-tools/include 
/usr/bin/install -c -m 644 /cygdrive/c/projects/tools/home/iphone-2.0-toolchain/ 
src/gcc/fixincludes/README-fixinc \ 
      /usr/local/lib/gcc/arm-apple-darwin9/4.2.1/install-tools/include/READM 
E 
/usr/bin/install -c fixinc.sh /usr/local/libexec/gcc/arm-apple-darwin9/4.2.1/ins 
tall-tools/fixinc.sh 
/usr/bin/install -c fixincl.exe \ 
      /usr/local/libexec/gcc/arm-apple-darwin9/4.2.1/install-tools/fixincl.e 
xe 
/usr/bin/install -c mkheaders /usr/local/libexec/gcc/arm-apple-darwin9/4.2.1/ins 
tall-tools/mkheaders 
make[2]: Leaving directory `/cygdrive/c/projects/tools/home/iphone-2.0-toolchain 
/build/gcc-4.2-iphone/fixincludes' 

make[2]: Entering directory `/cygdrive/c/projects/tools/home/iphone-2.0-toolchain/build/gcc-4.2-iphone/gcc' 
test -d po || mkdir po 
/cygdrive/c/downloads/mono/Mono-2.4/bin/msgfmt --statistics -o po/be.gmo /cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/gcc/po/be.po 
c:\downloads\mono\Mono-2.4\bin\msgfmt.exe: error while opening "/cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/gcc/po/be.po" for reading: No such 
file or directory 
make[2]: *** [po/be.gmo] Error 1 
make[2]: Leaving directory `/cygdrive/c/projects/tools/home/iphone-2.0-toolchain 
/build/gcc-4.2-iphone/gcc' 
make[1]: *** [install-gcc] Error 2 
make[1]: Leaving directory `/cygdrive/c/projects/tools/home/iphone-2.0-toolchain 
/build/gcc-4.2-iphone' 
make: *** [install] Error 2 

我也覺得奇怪,會的msgfmt執行,從單?爲什麼mono或.net用於此版本?

我有一個win32/windows xp系統,intel雙核心。

「G ++(GCC)3.4.4(cygming特殊,GDC 0.12,使用DMD 0.125) 版權所有(C)2004自由軟件基金會 這是自由軟件;看到源拷貝條件有保修;即使對於適銷性或特定用途適用性也不例外。「

+1

我沒看過這篇文章,但是做這件事的能力似乎不太可能。即使你解決了這個問題,你也可能會遇到新的問題。最重要的是,蘋果公司最終會停止這種做法,因爲它揮發了SDK許可證(我認爲它確實如此,無論如何...)。 – 2009-09-02 19:21:53

+1

這個莊園內建的任何東西都不適用於App Store,是的,它違反了Apple的條款。然而,通常爲越獄iPhone開發並將應用放在Cydia上的人可以做類似的事情。 – 2009-09-02 19:23:28

回答

4

從上面代碼的外觀來看,您正在使用cygwin編譯Windows的某些工具。

你編譯停止冷,因爲它無法找到:

/cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/libcpp/po/be.p 

它看起來像它正在尋找libcpp的某些部分,並不能找到它。您可以通過重新運行Cygwin安裝程序並選擇libcpp來解決此問題。

在附註中,我建議不要嘗試在Windows上運行iPhone開發工具。與Mac OS X相同的體驗遠不及您,並且您會遇到許多挫折,如上所述。

這些黑客通常只用於硬核編碼人員在非標準環境下使用黑客入侵的IDE。如果你不能理解上面的警告信息(對於使用gcc的人來說這很簡單),不要感覺不好,但你可能沒有能力完成你正在嘗試的任務。

我的建議是:給自己買的Mac mini,如果你不想花太多的錢,這些工具都與Mac,你將能夠有樂趣編寫iPhone應用程序,而不知道的挫折,當你發展環境將會突破。另外,當某些東西不能正常工作時,您不必擔心它是否是您的黑客入侵的開發環境或代碼問題。

您也無法將您的應用程序提交給iPhone AppStore,蘋果真的對此表示不滿,因此如果您發現自己在做這些事情,您將無法從Apple和其他任何iPhone開發人員那裏獲得任何幫助。

祝你好運!