静态FreeType具有依赖项(libfreetype.6.dylib) [英] Static FreeType has dependencies (libfreetype.6.dylib)

查看:610
本文介绍了静态FreeType具有依赖项(libfreetype.6.dylib)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在OSX上.用make构建.

On OSX here. Building with make.

我的设置:

./configure --enable-static=yes --enable-shared=no

我已经从香草FreeType 2.5.3下载中进行了其他更改.

I've changed nothing else from the vanilla FreeType 2.5.3 download.

这将导致libfreetype.a,并将其添加到项目中(与库链接二进制文件)时,我会遇到各种我在阴影库中无法获得的构建错误:

This results in libfreetype.a and when added to a project (link binary with libraries) I get all sorts of build errors that I don't get with a shaded library:

"_BZ2_bzDecompress", referenced from:
  _ft_bzip2_file_fill_output in libfreetype.a(ftbzip2.o)
 "_png_create_info_struct", referenced from:
  _Load_SBit_Png in libfreetype.a(sfnt.o)
"_inflateInit2_", referenced from:
  _FT_Stream_OpenGzip in libfreetype.a(ftgzip.o)

等等.

因此,如果我使用此./configure进行构建,它会变得很陌生:

So it get's stranger, if I build with this ./configure:

./configure --enable-static=yes --enable-shared=no  --with-png=no --with-bzip2=no --with-zlib=no

然后我可以建立我的项目了,但是当我运行它时,出现一个错误,提示找不到/opt/local/lib/libfreetype.6.dylib.当然不是,因为那是仅使用共享的FreeType构建构建的.

Then I can build my project okay, but when I run it I get an error saying that /opt/local/lib/libfreetype.6.dylib could not be found. Well of course not, because that's only built with a shared FreeType build.

如何构建完全无依赖的FreeType(如网站所述,您可以)?

How can I build an entirely dependency free FreeType (like the website says you can)?

非常感谢, 伊恩

推荐答案

我发现成功-最终-通过适应此答案并为blib.pngbzip

I found success - eventually - by adapting this answer and adding exclusions for blib.png,bzip

忽略iOS设备...

Ignoring the iOS pieces...

./configure CFLAGS="-arch i386" --without-zlib --without-png --without-bzip2
make clean
make
cp objs/.libs/libfreetype.a libfreetype-i386.a

./configure CFLAGS="-arch x86_64" --without-zlib --without-png --without-bzip2
make clean
make
cp objs/.libs/libfreetype.a libfreetype-x86_64.a

lipo -create -output libfreetype.a libfreetype-i386.a libfreetype-x86_64.a

这对FreeType 2.5.5 + Yosemite + Xcode 6.2的混合使用对我来说都是有效的

This has worked for me using a mix of FreeType 2.5.5 + Yosemite + Xcode 6.2

这篇关于静态FreeType具有依赖项(libfreetype.6.dylib)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆