Click here to Close
打印

[APP开发] 求助!can't locate file for: -lcrt1.o

求助!can't locate file for: -lcrt1.o

小弟尝试安装iPhone的toolchain,似乎一切过程全部OK,但是在编译教程中的实例代码时出现问题 ,提示如下:

$ make
arm-apple-darwin-gcc -c -Wall -pipe -ansi -O3  main.m -o main.o
arm-apple-darwin-gcc -c -Wall -pipe -ansi -O3  helloWorld.m -o helloWorld.o
arm-apple-darwin-gcc -lobjc -framework CoreFoundation -framework Foundation -fra
mework UIKit -framework LayerKit -framework CoreGraphics -o helloWorld main.o he
lloWorld.o
/usr/local/bin/arm-apple-darwin-ld: can't locate file for: -lcrt1.o
collect2: ld returned 1 exit status
make: *** [helloWorld] Error 1

请问哪位高手遇到过类似问题?如何解决?不胜感激!!
要打一个link的补丁

在某个google code的网页里面有介绍

TOP

谢谢您的帮助,请问是说下面的这些步骤吗?我试过了,没有效果。如果不是的话,可否再麻烦您给我多一些关于您方法的google关键字提示!谢谢

我找到的方法如下:
This happens because the installer is crap..
Copying the filesystem via SCP; ..why?
Decrypt a filesystem and extract it, then put that in /usr/local/arm-apple-darwin/filesystem.
Install your toolchain now, you'll probably have to delete everything and then run setup again, just make sure your filesystem is present in the directory.
Now, let it install.
When completed, save this file to /usr/local/arm-apple-darwin/filesystem/usr/lib.
Then:
cd /usr/local/arm-apple-darwin/filesystem/usr/lib
bash txt2symlink.sh
Wait for it to finish, and there's just one dylib you have to symlink.
mv libstdc++.6.dylib libstdc++.6.dylib.old
ln -s libstdc++.6.0.4.dylib libstdc++.6.dylib

Now you should be fine.
I did this and HelloWorld compiled for me, but then I was missing WebCore and stuff, so I have a hard time compiling other applications..
I have to find out how to get those headers.
这个ctr1.o存在的,只是环境变量没设置好。
在你的cygwin shell里面输入
LD_LIBRARY_PATH=/usr/local/arm-apple-darwin/lib
export LD_LIBRARY_PATH

再make, everything is ok!
谢谢!回头试一下!
我也是这个问题

照着楼上楼上打进去的
ok了

[ 本帖最后由 randymxj 于 2008-3-16 15:34 编辑 ]
强大


很好  哦
深公网安备案证字第 4403101901155 号