Xcode link freetype

Started by
2 comments, last by mike44 6 years, 2 months ago

Hi

I've compiled and linked to the libfreetype2.dylib. Now how to have it portable to other Macs?

If I link to .a I get bzip errors . Basically the same as here:

https://stackoverflow.com/questions/26888332/static-freetype-has-dependencies-libfreetype-6-dylib

but I can't set this in xcode linker flags. I get unrecognised option

The other would be to ship with my app libfreetype2.dylib? But that would cause errors if users don't have libpng etc.

installed?

Many thanks and regards

 

Advertisement
26 minutes ago, mike44 said:

but I can't set this in xcode linker flags. I get unrecognised option

Those aren't linker flags, they're compilation flags for freetype. If you want to go down that route, grab the freetype source code and compile it yourself using those flags.

The better option is probably to actually link to the bzip library (since that lack of that is why you get errors in the first place). That should be as simple adding -lbz2 to your linker flags to link to the system's bzip2 implementation.

One final option is to keep using the dylib, but to embed it in the app bundle. This is often... somewhat non trivial, but if you search around there are instructions on the web.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

ahh I see. Thanks

 

This topic is closed to new replies.

Advertisement