Freetype for IOS 连载1
来源:互联网 发布:sql server 2017 编辑:程序博客网 时间:2024/05/21 01:45
版权所有:转载请注明出处
http://blog.csdn.net/xcysuccess3
Freetype下载网址:
http://download.savannah.gnu.org/releases/freetype/
1.下载GCC编译工具 Xcode-Preferences-tools-Command Line Tools
2.下载最新的2.4.11下来
3.终端进入 freetype目录,然后输入命令
$ ./configure --prefix=/usr/local/iphone --host=arm-apple-darwin --enable-static=yes --enable-shared=no CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 CFLAGS="-arch armv7 -pipe -mdynamic-no-pic -std=c99 -Wno-trigraphs -fpascal-strings -O2 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=3.2 -I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/usr/include/libxml2 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk" CPP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cpp AR=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar LDFLAGS="-arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk -miphoneos-version-min=3.2"$ make clean;make$ cp objs/.libs/libfreetype.a libfreetype-arm7.a
$ ./configure --prefix=/usr/local/iphone --host=arm-apple-darwin --enable-static=yes --enable-shared=no CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 CFLAGS="-arch armv7 -pipe -mdynamic-no-pic -std=c99 -Wno-trigraphs -fpascal-strings -O2 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=3.2 -I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/usr/include/libxml2 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk" CPP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cpp AR=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar LDFLAGS="-arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk -miphoneos-version-min=3.2"$ make clean;make$ cp objs/.libs/libfreetype.a libfreetype-arm7.a
三个步骤编译完成之后 得到了.a文件。之后的如何计算宽高以及匹配字体正在研究中。
4.如果报错,就是SDK 不行
第一步骤改成
./configure --prefix=/usr/local/iphone --host=arm-apple-darwin --enable-static=yes --enable-shared=no CC=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc CFLAGS="-arch armv7 -pipe -mdynamic-no-pic -std=c99 -Wno-trigraphs -fpascal-strings -O2 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=5.1 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/includebxml2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk" CPP=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/binvm-cpp-4.2 AR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar LDFLAGS="-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -miphoneos-version-min=5.1"
即可。
- Freetype for IOS 连载1
- freetype for ios
- freetype-2.2.1 for arm 编译全过程
- 【教程连载】ArcGIS for iOS 开发系列(1) – 基本概念
- Compiling FreeType for iPhone
- freetype日记1
- freetype
- freetype
- freetype
- FreeType
- FREETYPE
- freetype
- freetype
- freetype-2.4.4 编译 (vs2005 for win32)
- freetype-2.4.4 编译 (vs2005 for win32)
- freetype-1.3.1 交叉编译
- freetype官网例子1
- 【教程连载】ArcGIS for iOS 开发系列(7) – 基础篇-空间要素-几何形状
- Eclipse配置SVN
- 如何在后台代码中执行原生sql?
- java中上传文件后设置文件只读、隐藏
- 合并报表优化记录
- 深入java虚拟机第二版
- Freetype for IOS 连载1
- 超级程序员神话
- NSMutableArray使用过程出现问题
- mysql的limit优化
- FB的一些概念
- 检查必填项的调用代码示例。
- temp
- 如何在一台机器上安装两个甚至多个版本的EAS服务器?
- VB使用manifest以支持xp风格和获得管理员权限