Linux 上构筑 iPhone OS3.1.2 开发环境之编译 HELLO WORLD
2010-02-09 18:46:00 来源:WEB开发网终于到了编译范例的时候了,范例在APPS目录里,好兴奋呀。。。
开始编译:
zhaowei@zhaowei-ubuntu:~/toolchain/apps/HelloToolchain$ make
arm-apple-darwin9-gcc -lobjc -bind_at_load -framework Foundation -framework CoreFoundation -framework UIKit -w -o HelloToolchain HelloToolchain.o
ld: library not found for -lobjc
collect2: ld returned 1 exit status
make: *** [HelloToolchain] 错误 1
看见没有,又报错了。在官方讨论区我找到解决方法。看下面:
Here's the solution I used (thanks brian.cr...):
Build the toolchain
In ~/Projects/iphone/toolchain/toolchain/sys, rename folder System to System2
In ~/Projects/iphone/toolchain/toolchain/sys/usr, rename folder lib to lib2
Copy folder ~/Projects/iphone/toolchain/sdks/iPhoneOS3.1.2.sdk/System to ~/Projects/iphone/toolchain/toolchain/sys
Copy folder ~/Projects/iphone/toolchain/sdks/iPhoneOS3.1.2.sdk/usr/lib to ~/Projects/iphone/toolchain/toolchain/sys/usr
Try to build HelloToolchain? again using instructions on this page (above).
Hope that helps. This was the only error I encountered using the toolchain.sh script
重新编译,看输出结果,证明我们编译成功了。呼呼,接下来就是要上传到IPHONE了。
zhaowei@zhaowei-ubuntu:~/toolchain/apps/HelloToolchain$ make
/home/zhaowei/toolchain/toolchain/pre/bin/arm-apple-darwin9-gcc -lobjc -bind_at_load -framework Foundation -framework CoreFoundation -framework UIKit -w -o HelloToolchain HelloToolchain.o
使用这个命令上传到IPHONE:
Navigate to the apps/HelloToolchain directory and run the following commands, noting that you must set "IP" to the address of your iPhone and change the path as appropriate:
cd ~/toolchain/apps/HelloToolchain
IP=xxx.xxx.xxx.xxx PATH=../../toolchain/pre/bin/:$PATH make deploy
上传会需要你输入密码,我居然试了半天,密码错误,怎么可能,默认的密码都进不去,后来才想起,是自己当初玩的时候修改了密码
- ››linux下两台服务器文件实时同步方案设计和实现
- ››Linux文件描述符中的close on exec标志位
- ››Linux下管道使用的一些限制
- ››Linux 误删/usr/bin 解决方法
- ››linux 添加新用户并赋予sudo执行权限
- ››linux常用软件安装方法
- ››Linux的分区已经被你从Windows中删除,系统启动后...
- ››linux enable命令大全
- ››Linux实现基于Loopback的NVI(NAT Virtual Interfa...
- ››Linux远程访问windows时,出现"连接被对端重...
- ››linux中使用head命令和tail命令查看文件中的指定行...
- ››linux swap 分区调控(swap分区 lvm管理)
更多精彩
赞助商链接