ios编译freetype2备忘
来源:互联网 发布:pix飞控软件 编辑:程序博客网 时间:2024/05/16 19:49
要下载tar格式的,zip的回车不对,confg会有问题
下面是转载别人的
The library has build configurations for most platforms, but unfortunately not iOS. This document describes how to build libfreetype.a as a universal binary for iOS and the Mac (i386, x86_64, arm7).
Download the Source
Download the latest freetype sourcecode from sourceforge.
Open a terminal and extract the archive.
Compiling the library
We have to compile the library four times, once for each architecture.
i386
$ ./configure CFLAGS="-arch i386"$ make
This forces configure to use the i386 architecture and build the library. The built library is located at objs/.libs/libfreetype.a. We copy this to our top level folder and build the next architecture.
$ cp objs/.libs/libfreetype.a libfreetype-i386.a
x86_64
Similar build setup for x86_64, notice the addition of make clean, we want to completely remove the i386 code.
$ ./configure CFLAGS="-arch x86_64";make clean;make$ cp objs/.libs/libfreetype.a libfreetype-x86_64.a
arm7
Arm7 is used on iPhone 3GS and newer. There are quite a few arguments that need to be passed to configure to make it build for arm7. I'm going under the assumption that you're targeting iOS 5.1 using gcc-4.2 as your compiler. If this is not what you want, please update the arguments below accordingly.
$ ./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/iPhoneOS5.1.sdk/usr/include/libxml2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk" CPP=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-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/iPhoneOS5.1.sdk -miphoneos-version-min=5.1"$ make clean;make$ cp objs/.libs/libfreetype.a libfreetype-arm7.a
Bringing it all together as a universal library
We now have 4 individual libraries. To combine them into a single universal library use the lipo tool.
$ lipo -create -output libfreetype.a libfreetype-i386.a libfreetype-x86_64.a libfreetype-arm7.a
And thats it.
You can check which architectures are in a library with the -info argument.
$ lipo -info libfreetype.a
Architectures in the fat file: libfreetype.a are: armv7 i386 x86_64
Refer to the original text.
- ios编译freetype2备忘
- freetype2 编译
- freetype2.4.6在iOS上各版本的编译脚本
- freetype2.4.6在iOS上各版本的编译脚本
- MFC编译Freetype2.3.7
- VS2013 编译freetype2.6.5
- freetype2 编译 (电子书 1)
- win10 vs2015 freetype2编译
- 交叉编译freetype2
- win32下FreeType2的编译
- win32下FreeType2的编译
- freetype2
- FreeType2
- freetype2
- freetype2
- linux上freetype2安装编译和使用
- iOS平台FFmpeg编译测试运行(备忘)
- IOS下Libevent编译步骤,及引入Xcode备忘
- 重定向与跳转的区别
- a标签href="javascript:void(0)" href="javascript:;"
- hdoj 1253 胜利大逃亡 多种解法的比较
- 博主信息
- 使用参数的宏定义
- ios编译freetype2备忘
- tomcat :Unable to load configuration. - [unknown location]
- poj 1035 Spell checker
- Error configuring application listener of class org.springframework.web.context.ContextL
- c# 更改注册表开机启动+mutex(互斥,同一时间同一台电脑只能运行一个程序)
- 博主信息
- android编译系统的makefile文件Android.mk写法如下
- mysql format(1.1,4) 精确查找
- 常见的比较优秀的插件汇总