使用 Cygwin 构建适用于 WindowsXP 的 iPhone
"使用 Eclipse 编写本机 iPhone 应用程序 CDT Windows 和 Linux 开发人员如何绕过 iPhone SDK 并使用开源工具编写 iPhone 应用程序” 作者:PJ Cabrera ([email protected])
我正在按照此中的说明进行操作文档并认为我已经做得很远了,但我收到一个错误,想知道你是否知道发生了什么。
当我输入命令时,它开始编译。大约 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 执行?为什么此构建使用 mono 或 .net?
我有一个win32/windowsxp系统,intel双核。
“g++ (GCC) 3.4.4(cygming 专用,gdc 0.12,使用 dmd 0.125) 版权所有 (C) 2004 自由软件基金会, Inc. 这是免费软件;请参阅复制条件的来源。没有 保修单;甚至不是为了适销性或特定用途的适用性。”
"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"
by PJ Cabrera ([email protected])
I was following the instructions from this document and thought I made it pretty far, but I get an error and wondered if you know what is going on.
When I enter the command, it starts to compile. After about 30 minutes, I get to the error you see below.
./make-toolchain.sh
Here is the error:
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
I also find it strange that msgfmt would be executed, from Mono? Why is mono or .net used for this build?
I have a win32/windowsxp system, intel dual core.
"g++ (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从上面的代码来看,您正在使用 cygwin 编译一些适用于 Windows 的工具。
你的编译停止了,因为它找不到:
看起来它正在寻找 libcpp 的某些部分,但找不到它。您可以通过重新运行 Cygwin 安装程序并选择 libcpp 来解决此问题。
顺便说一句,我建议不要尝试在 Windows 上运行 iPhone 开发工具。这与您在 Mac OS X 上获得的体验相差甚远,并且您会遇到如上所述的许多挫折。
这些黑客攻击通常仅适用于有能力在非标准环境中使用被黑客攻击的 IDE 的硬核编码人员。如果您无法理解上面的警告消息(对于使用过 gcc 的人来说这相当简单),请不要感到难过,但您可能不具备完成您正在尝试的任务的技能。
我的建议:如果您不想花太多钱,就给自己买一台 Mac mini,Mac 附带了这些工具,您将能够享受编写 iPhone 应用程序的乐趣,而不必担心自己什么时候会遇到麻烦。接下来将打破开发环境。此外,当某些东西无法正常工作时,您不必担心是您的开发环境被黑还是代码有问题。
您也将无法将您的应用程序提交到 iPhone AppStore,而且 Apple 非常不赞成这样做,因此如果 Apple 甚至其他 iPhone 开发人员发现您这样做,您将无法获得任何帮助。
祝你好运!
From the looks of what code you have above, you are using cygwin to compile some tools for Windows.
Your compile stopped cold because it can't find:
Which looks like it is looking for some part of libcpp and cant find it. You can probably solve this by re-running the Cygwin installer and choosing libcpp when you do.
On a side note, I would advise not doing trying to run iPhone dev tools on Windows. It's nowhere near the same experience you will get on Mac OS X and you will run into many many frustrations as above.
These hacks are generally only for hardcore coders with the chops to use a hacked IDE on a non-standard environment. If you cannot understand the warning message above (which is fairly simple for anyone who has used gcc), don't feel bad but you probably don't have the skill to accomplish what you are attempting.
My advice: Buy yourself a Mac mini if you don't want to spend much money, the tools come with the Mac and you will be able to have fun writing iPhone apps without the frustration of wondering when your development environment will next break. In addition, when something isn't working right you won't have to worry whether it is your hacked dev environment or a problem with your code.
You also won't be able to submit your app to the iPhone AppStore, and Apple really frown on doing this so you won't get any help from Apple and probably any other iPhone dev's if they find out your doing this.
Good luck!