仓酷云

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 3022|回复: 20
打印 上一主题 下一主题

[学习教程] IOS教程之ios编译libfreetype,并顺应armv7,armv7s,arm64仓酷云

[复制链接]
活着的死人 该用户已被删除
跳转到指定楼层
楼主
发表于 2015-1-18 11:32:26 | 显示全部楼层 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
照着书上的例子,一个一个做下来,只要不是文盲,就都会的呀,没有体现我的一点点个人价值。所以我决定了,不能再这样下去在github里看到大家网公布的一个CCHtmlLabel的RichText控件,能够显现庞大的html布局的富文本,设置好以后发明在摹拟器下面能顺遂跑起来,但在真机上却编译失利。
看errorlog的意义是指没有armv7s的slice,再看了一下CCHtmlLabel所用的libfreetype库,是2011年编译的,有点旧,事先iphone4s才刚出呢,固然没有armv7s了。
因而到SourceForge下载了freetype的源代码,编译成lib后再交换本来的libfreetype.a,再次用Xcode编译全部游戏项目,发明仍是有个linker的毛病:undefinedreferenceto`BZ2_bzDecompressInit。
这个复杂,在xcode里增加对libbz2.1.0.dylib的援用便可。
有必要的请到这里下载:http://download.csdn.net/detail/visualcatsharp/7076545
上面再纪录一下编译的历程
mkdir/var/tmp/build-armv7


./configureCFLAGS="-archi386"
make
cpobjs/.libs/libfreetype.alibfreetype-i386.a


./configureCFLAGS="-archx86_64";makeclean;make
cpobjs/.libs/libfreetype.alibfreetype-x86_64.a


makeclean
./configure--prefix=/var/tmp/build-armv7--host=arm-apple-darwin--enable-static=yes--enable-shared=noCC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ccCFLAGS="-archarmv7-pipe-std=c99-Wno-extended-offsetof-Wno-trigraphs-fpascal-strings-O2-Wreturn-type-Wunused-variable-fmessage-length=0-fvisibility=hidden-miphoneos-version-min=4.2-I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk"AR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/arLDFLAGS="-archarmv7-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk-miphoneos-version-min=4.2"
make
cpobjs/.libs/libfreetype.alibfreetype-arm7.a


makeclean
./configure--prefix=/var/tmp/build-armv7--host=arm-apple-darwin--enable-static=yes--enable-shared=noCC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ccCFLAGS="-archarmv7s-pipe-std=c99-Wno-extended-offsetof-Wno-trigraphs-fpascal-strings-O2-Wreturn-type-Wunused-variable-fmessage-length=0-fvisibility=hidden-miphoneos-version-min=4.2-I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk"AR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/arLDFLAGS="-archarmv7s-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk-miphoneos-version-min=4.2"
make
cpobjs/.libs/libfreetype.alibfreetype-arm7s.a


makeclean
./configure--prefix=/var/tmp/build-armv7--host=arm-apple-darwin--enable-static=yes--enable-shared=noCC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ccCFLAGS="-archarm64-pipe-std=c99-Wno-extended-offsetof-Wno-trigraphs-fpascal-strings-O2-Wreturn-type-Wunused-variable-fmessage-length=0-fvisibility=hidden-miphoneos-version-min=6.0-I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk"AR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/arLDFLAGS="-archarm64-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk-miphoneos-version-min=6.0"
makeclean;make
cpobjs/.libs/libfreetype.alibfreetype-arm64.a


lipo-create-outputlibfreetype.alibfreetype-i386.alibfreetype-x86_64.alibfreetype-arm7.alibfreetype-arm7s.alibfreetype-arm64.a
lipo-infolibfreetype.a

照着书上的例子,一个一个做下来,只要不是文盲,就都会的呀,没有体现我的一点点个人价值。所以我决定了,不能再这样下去
活着的死人 该用户已被删除
沙发
 楼主| 发表于 2015-5-1 11:10:36 | 显示全部楼层
其次学习方法和学习心态很重要,在学习当中应该保持一颗良好的心态。应该借鉴别人好的学习方法,大家互相帮助,取长补短。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|仓酷云 鄂ICP备14007578号-2

GMT+8, 2024-5-22 11:41

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表