Compiling on iOS

From MMS Wiki
Jump to: navigation, search

Compiling Ogg Vorbis

IDZPrecompiledOgg and IDZPrecompiledVorbis are very helpful, with README file having instructions.

If new XCode has been installed xcode-select --install needs to be done

In both packages, .bash file needs to be modified so that IOS version is one for which simulator sdk is present (9.2 for XCode 7.2.1)

To get bitcode support, add "-fembed-bitcode -DENABLE_BITCODE=YES" to IDZ_FLAGS in IDZ_BUILD/idz_configuration

Vorbis will then refuse to compile, complaining of a conflict with -fembed-bitcode. Simplest workaround is to download the tar.gz manually, unpack it, edit configure and to remove the conflicting flag, repack it and change IDZPrecompiledVorbis to use the new file instead of curl-ing from internet.

To get them to output a lipo-ed file, add

  1. Or just create a combined library with lipo

lipo -create install-*/lib/libvorbisall.a -output libFatVorbis.a

to the .bash file instead of the framework command

Files can then be found in IDZBuildRoot/lib{ogg|vorbis}/<version>/