关于speex 编译(ios版本)(二)

作者: 今年27 | 来源:发表于2017-11-10 16:44 被阅读267次

为什么打出的静态库要支持这么多架构?

看看这个文章:http://blog.csdn.net/zuoyou1314/article/details/46638073

里面有详细的说明,打出所有库命令如下,因为很容易错,所以我就全部记录下来,以供提醒

这里有参考一位大神写的文章,不过他那个写的比较早没有arm64架构的,我在这里补充一下

大神文章地址:http://blog.csdn.net/ysysbaobei/article/details/8838900

1. Ogg-i386的库(模拟器)

./configure -prefix=/Users/lenkeng/Documents/speex/libogg-1.3.3/i386 -host=i386-apple-darwin -build=x86_64-apple-darwin16.7.0 CC="/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -std=c99 -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.1.sdk/"

make

make install

make clean(一定要clean,不然后面编译的都是第一次的编译的内容)

2.ogg-armv6库(无用)

3. Ogg-armv7库

./configure -prefix=/Users/lenkeng/Documents/speex/libogg-1.3.3/armv7 -host=armv7-apple-darwin -build=x86_64-apple-darwin16.7.0 CC="/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -std=c99 -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk"

make

make install

make clean

4. Ogg-armv7s库

./configure -prefix=/Users/lenkeng/Documents/speex/libogg-1.3.3/armv7s -host=armv7s-apple-darwin -build=x86_64-apple-darwin16.7.0 CC="/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -std=c99 -arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk"

make

make install

make clean

6. Ogg-arm64库(所有的库必须支持64位系统)

./configure -prefix=/Users/lenkeng/Documents/speex/libogg-1.3.3/arm64 -host=arm-apple-darwin -build=x86_64-apple-darwin16.7.0 CC="/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -std=c99 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk"

make

make install

make clean

7.speex-i386库(模拟器)

./configure -prefix=/Users/lenkeng/Documents/speex/speex-1.2rc1/i386 -host=i386-apple-darwin -disable-shared -enable-static -disable-oggtest -disable-fixed-point -enable-float-api -build=x86_64-apple-darwin16.7.0 -with-ogg=/Users/lenkeng/Document/speex/libogg-1.3.3/i386 CC="/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -std=c99 -arch i386 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.1.sdk/"

make

make install

make clean

8.speex-armv6(无用)

9. Speex-armv7库

./configure -prefix=/Users/lenkeng/Documents/speex/speex-1.2rc1/armv7 -host=armv7-apple-darwin -disable-shared -enable-static -disable-oggtest -disable-fixed-point -enable-float-api -build=x86_64-apple-darwin16.7.0 -with-ogg=/Users/lenkeng/Document/speex/libogg-1.3.3/armv7 CC="/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -std=c99 -arch armv7 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk"

make

make install

make clean

10. Speex-armv7s库

./configure -prefix=/Users/lenkeng/Documents/speex/speex-1.2rc1/armv7s -host=armv7s-apple-darwin -disable-shared -enable-static -disable-oggtest -disable-fixed-point -enable-float-api -build=x86_64-apple-darwin16.7.0 -with-ogg=/Users/lenkeng/Document/speex/libogg-1.3.3/armv7s CC="/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -std=c99 -arch armv7s -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk"

make

make install

make clean

11. Speex-arm64库(ios后期必须要64位)

./configure -prefix=/Users/lenkeng/Documents/speex/speex-1.2rc1/arm64 -host=arm-apple-darwin -disable-shared -enable-static -disable-oggtest -disable-fixed-point -enable-float-api -build=x86_64-apple-darwin16.7.0 -with-ogg=/Users/lenkeng/Document/speex/libogg-1.3.3/arm64 CC="/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -std=c99 -arch arm64 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk"

make

make install

make clean

11.合并libogg

cd 到 libogg-1.3.3 文件夹下建立OutPut_A(mkdir)文件夹

lipo -create i386/lib/libogg.a armv7/lib/libogg.a armv7s/lib/libogg.a arm64/lib/libogg.a -output OutPut_A/libogg.a

12.合并speex的两个库

在speex-1.2rc1建立OutPut_A(mkdir)文件夹:

cd Desktop/speexLibrary/speex-1.2rc1/

不带arm6:

lipo -create i386/lib/libspeex.a armv7/lib/libspeex.a armv7s/lib/libspeex.a arm64/lib/libspeex.a -output OutPut_A/libspeex.a

lipo -create i386/lib/libspeexdsp.a armv7/lib/libspeexdsp.a armv7s/lib/libspeexdsp.a arm64/lib/libspeexdsp.a -output OutPut_A/libspeexdsp.a

通过lipo -info命令可以查看.a文件支持的架构

lipo -info libogg.a

lipo -info libspeex.a

lipo -info libspeexdsp.a

Architectures in the fat file: libogg.a are: i386 armv7 armv7s arm64

相关文章

  • 关于speex 编译(ios版本)(二)

    为什么打出的静态库要支持这么多架构? 看看这个文章:http://blog.csdn.net/zuoyou1314...

  • 关于speex 编译(ios版本)(一)

    此时为xcode9.1版本 在Documents文件夹下mkdir(创建) speex文件夹 由于speex需要o...

  • [转]speex

    speex官方文档 编解码器列表 speex官方下载 Speex 同时适用于 Ios 与 Android 系列 音...

  • 音视频笔记1

    关于 Speex Speex官网:http://speex.org/由于语音对话编解码需要一个免费的开源软件,所以...

  • TensorFlow编译

    Mac编译iOS版本tensorflow 在 iOS 平台上的应用 跑了下iOS的demo Ubuntu编译x86...

  • BaseSDK & DeploymentTarget

    Base SDK设置为当前xcode编译使用的sdk版本,比如”Latest IOS(IOS7.1)″。IOS D...

  • android-Speex源码编译

    1.配置NDK环境 # 在.bash_profile中配置如下代码 export ANDROID_NDK=/U...

  • HiFiVeSDK接入文档

    二、SDK集成 2.1 系统支持 iOS8.0以上 2.2运行环境 建议使用XCode8.0以上版本进行编译。 2...

  • LAME编译iOS版本

    1、首先需要下载lame:目前最新版本是3.100 下载地址:https://sourceforge.net/pr...

  • skia编译ios版本

    先看一遍官方文档: skia.org/docs/user/build[http://skia.org/docs/u...

网友评论

    本文标题:关于speex 编译(ios版本)(二)

    本文链接:https://www.haomeiwen.com/subject/axabmxtx.html