在github里看到人人网发布的一个CCHtmlLabel的RichText控件,可以显示复杂的html结构的富文本,配置好之后发现在模拟器上面能顺利跑起来,但在真机上却编译失败。
看error log的意思是指没有armv7s的slice,再看了一下CCHtmlLabel所用的libfreetype库,是2011年编译的,有点旧,当时iphone4s才刚出呢,当然没有armv7s了。
于是到SourceForge下载了freetype的源代码,编译成lib后再替换原来的libfreetype.a,再次用Xcode编译整个游戏项目,发现还是有个linker的错误:undefined
reference to `BZ2_bzDecompressInit'。
这个简单,在xcode里添加对libbz2.1.0.dylib的引用即可。
有需要的请到这里下载:http://download.csdn.net/detail/visualcatsharp/7076545
下面再记录一下编译的过程
mkdir /var/tmp/build-armv7
./configure CFLAGS="-arch i386"
make
cp objs/.libs/libfreetype.a libfreetype-i386.a
./configure CFLAGS="-arch x86_64";make clean;make
cp objs/.libs/libfreetype.a libfreetype-x86_64.a
make clean
./configure --prefix=/var/tmp/build-armv7 --host=arm-apple-darwin --enable-static=yes --enable-shared=no CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc CFLAGS="-arch armv7 -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/ar LDFLAGS="-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk
-miphoneos-version-min=4.2"
make
cp objs/.libs/libfreetype.a libfreetype-arm7.a
make clean
./configure --prefix=/var/tmp/build-armv7 --host=arm-apple-darwin --enable-static=yes --enable-shared=no CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc CFLAGS="-arch armv7s -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/ar LDFLAGS="-arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk
-miphoneos-version-min=4.2"
make
cp objs/.libs/libfreetype.a libfreetype-arm7s.a
make clean
./configure --prefix=/var/tmp/build-armv7 --host=arm-apple-darwin --enable-static=yes --enable-shared=no CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc CFLAGS="-arch arm64 -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/ar LDFLAGS="-arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk
-miphoneos-version-min=6.0"
make clean; make
cp objs/.libs/libfreetype.a libfreetype-arm64.a
lipo -create -output libfreetype.a libfreetype-i386.a libfreetype-x86_64.a libfreetype-arm7.a libfreetype-arm7s.a libfreetype-arm64.a
lipo -info libfreetype.a
分享到:
相关推荐
ios编译libfreetype,并适应armv7,armv7s,arm64 一文里的资源
适用于ios i386/armv7/armv7s/arm64
用mingw32编译好的libass,libx264,libfreetype,libfontconfig,libxml2,libfribidi库,也可以自己编译,链接:https://blog.csdn.net/theartedly/article/details/110980820
在windows下要编译的话,可以直接打开freetype-2.4.10\builds\win32\vc2008目录下的freetype.sln进行编译。有时候我们只希望对特定字体做简单的事情,则我们可以对libfreetype进行裁剪。裁剪的方式有两种:1,对于...
freetype-2.6.5(已经编译lib)
freetype android 编译so库 支持 编译64位库
是一个系统库文件,特别用于容器镜像如centos:7缺失的情况,把这个文件拷贝到/lib64/就能用了,当java程序遇到字体问题时就可以使用
error while loading shared libraries: libfreetype.so.6: cannot open shared object file: No such file or directory 缺少的文件libfreetype.so.6
Linux里面的动态库——libfree.so.6,可能在运行某些程序的时候,会报缺少某个动态库的错
ffmpeg vs2015 WIN10X64 编译,X64版本。 2018-3-04,更新的代码。 静态库。无需VS2015运行库。 集成了 libass.lib libbluray.lib libbz2.lib libcdio.lib libcdio_paranoia.lib libfontconfig.lib libfreetype.lib ...
ubuntu20.04 可直接使用的ffmpeg(静态编译) built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04) configuration: --prefix=/root/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/root/ffmpeg_build/...
Linux Ubuntu14.4 JRE7 amd64 lib so包 在Linux 上安装JAVA环境老是因为缺包而出问题。 比如:java.lang.UnsatisfiedLinkError: no nio in java.library.path 就是因为缺包引起的。 直接把包覆盖到/java/jre/lib/...
适用于Windows 32位和64位的编译版本。 与MS Visual Studio 2013一起编译。 其他来源 您也可以使用提供的版本。 单击或Windows下载的链接,向下滚动到“必需的第三方依赖项” ,下载Freetype运行时档案并将其解...
libfreetype6-2.4.8-2plf-plf2012.0.i586.rpm
附件为Centos6.6环境下静态编译的ffmpeg-3.3.3版本linux可执行程序和SDK库,其中包含基本的x264、aac编解码库;还增加字幕渲染(drawtext参数)、水印叠加等功能;configure配置参数为: ./configure --target-os=...
离线安装包,测试可用
编译ROS工程的过程中,因为安装了anaconda导致系统库的路径被覆盖掉,因而报错的时候 runtime library [libssl.so.1.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in: /home/rw/anaconda3/lib 首先查看...
./configure --enable-yasm --enable-shared --disable-static --enable-libfreetype --enable-avfilter --enable-libx264 --enable-gpl --enable-avresample --enable-error-resilience (配置)
Ubuntu14.04安装QT无法运行的解决方法,内含libdbus和libfreetype库。 直接解压到Qt/Tools/QtCreator/lib/Qt/lib/目录下即可使用。 详细使用方法请看https://www.jianshu.com/p/da6a0706fe07