speex依赖于libogg,需要先编译libogg
libogg:
./configure -prefix=/Users/simbi/Desktop/speex/ogg/i386 -host=i386-apple-darwin -build=x86_64-apple-darwin11.3.0 CC="/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc -std=c99 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/"
./configure -prefix=/Users/simbi/Desktop/speex/ogg/armv6 -host=armv6-apple-darwin -build=x86_64-apple-darwin11.3.0 CC="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -std=c99 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/"
./configure -prefix=/Users/simbi/Desktop/speex/ogg/armv7 -host=armv7-apple-darwin -build=x86_64-apple-darwin11.3.0 CC="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -std=c99 -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/"
libspeex:
./configure -prefix=/Users/simbi/Desktop/speex/speex/i386 -host=i386-apple-darwin -disable-shared -enable-static -disable-oggtest -enable-fixed-point -disable-float-api -build=x86_64-apple-darwin11.3.0 -with-ogg=/Users/simbi/Desktop/speex/ogg/i386 CC="/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc -std=c99 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/"
./configure -prefix=/Users/simbi/Desktop/speex/speex/armv6 -host=armv6-apple-darwin -disable-shared -enable-static -disable-oggtest -enable-fixed-point -disable-float-api -build=x86_64-apple-darwin11.3.0 -with-ogg=/Users/simbi/Desktop/speex/ogg/armv6 CC="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -std=c99 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/"
./configure -prefix=/Users/simbi/Desktop/speex/speex/armv7 -host=armv7-apple-darwin -disable-shared -enable-static -disable-oggtest -enable-fixed-point -disable-float-api -build=x86_64-apple-darwin11.3.0 -with-ogg=/Users/simbi/Desktop/speex/ogg/armv7 CC="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -std=c99 -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/"
// 制作模拟器与真机通用静态库
lipo -create ogg/i386/lib/libogg.a ogg/armv6/lib/libogg.a ogg/armv7/lib/libogg.a -output libogg.a
lipo -create speex/i386/lib/libspeex.a speex/armv6/lib/libspeex.a speex/armv7/lib/libspeex.a -output libspeex.a
本文介绍如何为iOS模拟器及真实设备编译跨平台的Speex和Libogg静态库。通过指定不同的目标平台和编译选项,可以生成适配i386、armv6和armv7架构的库文件,并最终使用lipo工具合并成一个通用的静态库。
8449

被折叠的 条评论
为什么被折叠?



