开发学院手机开发iPhone 开发 Linux 上构筑 iPhone OS3.1.2 开发环境之编译 HEL... 阅读

Linux 上构筑 iPhone OS3.1.2 开发环境之编译 HELLO WORLD

 2010-02-09 18:46:00 来源:WEB开发网   
核心提示:终于到了编译范例的时候了,范例在APPS目录里,Linux 上构筑 iPhone OS3.1.2 开发环境之编译 HELLO WORLD,好兴奋呀,,怎么可能,默认的密码都进不去,,开始编译:zhaowei@zhaowei-ubuntu:~/toolchain/apps/HelloToolchain$ makearm-

终于到了编译范例的时候了,范例在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

上传会需要你输入密码,我居然试了半天,密码错误,怎么可能,默认的密码都进不去,后来才想起,是自己当初玩的时候修改了密码

1 2  下一页

Tags:Linux 构筑 iPhone

编辑录入:coldstar [复制链接] [打 印]
[]
  • 好
  • 好的评价 如果觉得好,就请您
      0%(0)
  • 差
  • 差的评价 如果觉得差,就请您
      0%(0)
更多精彩
    赞助商链接

    热点阅读
      焦点图片
        最新推荐
          精彩阅读