为所有架构编译 PJSIP 2.5 库

2023-12-20

要为 iPhone 设备编译 PJSIP 库,我使用此代码

make distclean && make clean
ARCH='-arch arm64' ./configure-iphone --enable-opus-codec
make dep
make

此代码允许我仅针对单一架构安装我的应用程序。 要为所有架构(armv7、armv7s、arm64、i386、x86_64)编译pjsip,我可以使用哪些命令或工具


--- One Way to build PJSIP libraries --- test with pjsip 2.6

//Updated for XCode 8. 

Building PJSIP
$ cd /Users/ravimalviya/Developer/Dev2/trunk

//If you want to specify the minimum supported iOS version
//export MIN_IOS="-miphoneos-version-min=8.0"

Compile Library and Build For Default iPhone 4 use armv7 architecture
$ ./configure-iphone && make dep && make clean && make

Build For iPhone 5, use armv7s architecture
$ ARCH='-arch armv7s' ./configure-iphone && make dep && make clean && make

Build For iPhone 5s, use arm64 architecture
$ ARCH='-arch arm64' ./configure-iphone && make dep && make clean && make

Build For Simulator, use i386 architecture
export DEVPATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
ARCH="-arch i386" CFLAGS="-O2 -m32 -mios-simulator-version-min=5.0" LDFLAGS="-O2 -m32 -mios-simulator-version-min=5.0" ./configure-iphone
make dep && make clean && make

Build For Simulator, use x86_64 architecture
export DEVPATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
ARCH="-arch x86_64" CFLAGS="-O2 -m32 -mios-simulator-version-min=5.0" LDFLAGS="-O2 -m32 -mios-simulator-version-min=5.0" ./configure-iphone
make dep && make clean && make

The compilation result
pjlib/lib       
pjlib-util/lib
pjmedia/lib
pjsip/lib
pjnath/lib
third_party/lib
Note add into project..

Combine resulting archtecture(arm64,armv7,armv7s,i386, x86_64) supported library .a file.

//goto directory where you collect all build library. create folder name arm64, armv7s, armv7, i386, x86_64 and put all library respectivly. each having only one arch supported library file.
//rename file in all these 5 folders it's a easy way to make universal library.
//Also create folder named unified where all unversal library will create.

$ export LIB_NAME="libg7221codec.a"
$ lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME

//-arch armv7s armv7s/$LIB_NAME means support armv7s get library from directory armv7s/$LIB_NAME and $LIB_NAME file name that only support armv7s.
//-arch arm64 arm64/$LIB_NAME ............
//-arch armv7 armv7/$LIB_NAME ............
//-arch i386 i386/$LIB_NAME ..............
//-arch x86_64 x86_64/$LIB_NAME ..............
//unified/$LIB_NAME is directory where unversal library will build using lips. with same name $LIB_NAME that export. do it same.

//check which arch you lib is supporting
xcrun -sdk iphoneos lipo -info unified/$LIB_NAME

$ export LIB_NAME="libgsmcodec.a"
$ lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
$ export LIB_NAME="libilbccodec.a"
$ .....same as above in lipo......
$ export LIB_NAME="libpj.a"
$ .....same as above in lipo......
$ export LIB_NAME="libpjlib-util.a"
$ .....same as above in lipo......
$ export LIB_NAME="libpjmedia-audiodev.a"
$ .....same as above in lipo......
$ export LIB_NAME="libpjmedia-codec.a"
$ .....same as above in lipo......
$ export LIB_NAME="libpjmedia-videodev.a"
$ .....same as above in lipo......
$ export LIB_NAME="libpjmedia.a"
$ .....same as above in lipo......
$ export LIB_NAME="libpjnath.a"
$ .....same as above in lipo......
$ export LIB_NAME="libpjsdp.a"
$ .....same as above in lipo......
$ export LIB_NAME="libpjsip-simple.a"
$ .....same as above in lipo......
$ export LIB_NAME="libpjsip-ua.a"
$ .....same as above in lipo......
$ export LIB_NAME="libpjsip.a"
$ .....same as above in lipo......
$ export LIB_NAME="libpjsua.a"
$ .....same as above in lipo......
$ export LIB_NAME="libpjsua.a"
$ .....same as above in lipo......
$ export LIB_NAME="libpjsua2.a"
$ .....same as above in lipo......
$ export LIB_NAME="libresample.a"
$ .....same as above in lipo......
$ export LIB_NAME="libspeex.a"
$ .....same as above in lipo......
$ export LIB_NAME="libsrtp.a"
$ .....same as above in lipo......
$ export LIB_NAME="libyuv.a"
$ lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME

Note: Unversal libraries you can add into your project and also mention in library search path.

//In order to use the pjsip libraries, we need to include folder that ahve header files that access .a files. Naturally, the header files are located in:
pjlib/include
pjlib-util/include
pjmedia/include
pjnath/include
pjsip/include

Note: do't add into project..buz you can not import like import <pjsip-lib/pjsip.h>
so just place these folder into project directory where ever you want but mention in header search path.

Enjoy (:)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

为所有架构编译 PJSIP 2.5 库 的相关文章

  • 当现有的转换或演示正在进行时;导航堆栈不会更新

    我遇到过这个警告 PushViewController animated 在现有转换或演示文稿运行时调用 发生 导航堆栈不会更新 当试图打电话时navigationController popViewControllerAnimated f
  • Xcode 8 - 删除了一些按钮边框

    我刚刚将 Xcode 版本从 7 3 更新到 8 0 一些按钮边框消失了 代码看起来很好 所以我真的不知道各层发生了什么 顺便说一句 在其他一些控制器中我可以看到图层边框 self button layer borderColor bord
  • Flutter:“UIAlertView”已弃用:首先在 iOS 9.0 中弃用

    我收到以下错误 Users flo pub cache hosted pub dartlang org image picker 0 6 7 12 ios Classes FLTImagePickerPlugin m 1 49 20 war
  • 可接受的滚动 FPS 是多少?提高性能的技巧有哪些?

    我在许多 WWDC 视频中看到 您希望尽可能达到 60 0 FPS 以获得更好的平滑滚动体验 我有一个 UIScrollLView 它可以立即加载图像和几个表格视图 目前我的帧速率为 30 FPS 这是推荐 FPS 的一半 只是想知道对于加
  • NSDateComponents 工作日没有显示正确的工作日?

    我得到了一个 NSDate 例如 1 6 12 星期五 并试图找出它是星期几 我的一周从星期一开始 所以星期五应该是工作日 5 NSCalendar calendar NSCalendar alloc initWithCalendarIde
  • ARC 项目中出现“Missing [super dealloc]”警告

    我已经将一个项目重构为 ARC 看起来不错 但是有一个对象使用通知中心 我在自定义的 dealloc 方法中删除了观察者 这在非 ARC 项目中效果很好 它也适用于 ARC 但我收到一个疯狂的警告 方法可能缺少 super dealloc
  • Xcode 5:单元测试未运行

    我创建了一些测试用例 它们都通过了 那是因为它们没有被运行 从 Xcode 中 我得到 Test Suite All tests started at Test Suite All tests finished at Executed 0
  • Xcode 代码覆盖率和 fopen$UNIX2003

    我面临着一个似乎相当广泛的问题 当我使用 Lion 激活 Xcode 4 2 1 中的代码覆盖率时 它显示以下错误 Detected an attempt to call a symbol in system libraries that
  • SwiftUI 从一个列表拖动到另一个列表

    我正在尝试在列表之间拖放 我尝试过的 我找到了一个在 UIKIt 中执行此操作并使用 UIViewControllerRepresentable 的解决方案 但这不是我想要的 另一个解决方案是在列表上使用 onDrag 但这在 iPad 上
  • RestKit:BOOL 值

    我有一个NS ENUM保存清单的状态 这两个属性是Pending and Completed typedef NS ENUM NSUInteger ChecklistStatus Pending Completed 我正在尝试获取状态并将其
  • 如何缩放 CAShapeLayer

    我很快就成功制作了动画bezier path它包含在一个CAShapeLayer 我唯一的问题是将其实现到其他屏幕尺寸上 有谁知道我如何扩展CAShapeLayer里面有路径吗 即使其变为原始大小的一半 使用这个函数 var shapela
  • 在 iPhone 的日期选择器中插入空白值

    我有一个日期选择器 使用操作表显示 我想在日期选择器中插入一个空白值并将其设置为默认值 它应该仅根据用户选择而改变 这可能吗 如果是的话怎么办 感谢所有宝贵的建议 UIDatePicker 仅支持某些模式 并且不允许这种自定义 将空白或自定
  • 致命错误:向量:没有这样的文件或目录

    我有一个 Android 项目 其中包含大量 C 本机代码 但是 我无法构建我的库 因为它无法找到 vector h 头文件 可能是什么问题 我在几乎所有页面中包含的示例 include
  • kCVPixelFormatType_420YpCbCr8BiPlanarFullRange 帧到 UIImage 转换

    我有一个应用程序可以捕获 kCVPixelFormatType 420YpCbCr8BiPlanarFullRange 格式的实时视频来处理 Y 通道 根据苹果的文档 kCVPixelFormatType 420YpCbCr8BiPlana
  • 如何加密捆绑的文本/json 文件?

    我的 iOS 应用程序捆绑了几个文件 现在 如果有人下载该应用程序并访问 ipa 文件 他就可以轻松阅读它们 我想让事情变得更难 您知道有关该主题的任何资源吗 我想我需要一个加密库 以及编码文件的构建脚本中的一些脚本 当然 我知道有人可能会
  • coreplot 栏点击不工作

    我从 Github 下载了这段代码 https github com gilthonweapps CorePlotBarChartExample https github com gilthonweapps CorePlotBarChart
  • 检查url图片是否存在

    我正在尝试使用 if 语句检查 url 图像是否存在 然而 当尝试通过错误的图像网址测试它时 它会不断返回 致命错误 在解包可选值时意外发现 nil code var httpUrl subJson image url stringValu
  • 使用 OCMock 以代码块作为参数的存根方法

    有没有一种方法可以存根方法 以块作为参数 例如方法 void reverseGeocodeLocation CLLocation location completionHandler CLGeocodeCompletionHandler c
  • gradle 复制为 doLast 不起作用

    我正在尝试做一件非常简单的事情 由于 gradle 在清理时会删除构建目录中的所有文件 因此我想在创建发布版本时将 apk 移至其他位置 所以我在链中添加了一个复制任务 并将其设置为最后一个 我尝试过的任何方法都不起作用 所以我简化了它并添
  • 如何使用 Swift 将文本复制到剪贴板/粘贴板

    我正在寻找一个干净的示例 说明如何将文本复制到 iOS 剪贴板 然后可以在其他应用程序中使用 粘贴 该功能的好处是可以快速复制文本 无需传统文本复制的标准文本突出显示功能 我假设关键课程位于UIPasteboard 但在中找不到相关区域他们

随机推荐

  • X.509 证书中的专有名称长度限制

    在通用名称字段中 如 OID 2 5 4 3 的 ASN 1 表示法中所定义 限制最多为 64 个字符 如果我们想要一个超过 64 个字符的通用名 有什么办法吗 即使你可以哄骗你的证书生成代码拥有更长的 CN 它也是clients这需要改变
  • 根据字符串生成UUID

    如何在 C 中生成确定性 GUID UUID v3 v5 将命名空间和名称都作为字符串 根据 RFC4122 您需要提供命名空间作为 GUID 名称作为字符串 提供给函数 所以我想提供两个字符串而不是 guid对于命名空间和名称字符串 并且
  • 升级到 Notes 11 - Apache POI java 库的问题

    我们在 Domino 9 服务器上运行的多个 Xpages 应用程序中使用 Apache POI 库 现在 当将 HCL Notes Designer 升级到 R11 时 我们可以看到 Apache POI 在版本 4 1 1 的 jvm
  • Parent Last Classloader 解决Java类路径地狱?

    我有一个项目使用两个版本的 bouncyCastle jars bcprov jdk15 和 bcprov jdk16 jvm 加载旧版本 但我编写的一个功能需要更新版本才能运行 我尝试使用自定义类加载器来解决这个类路径地狱 经过一番谷歌搜
  • 从 OpenAPI 3 生成 Java Spring API

    我尝试从 OpenAPI v3 YAML 文件生成 Spring REST 接口 构建 说 Successfully generated code to property class java lang String property cl
  • 无法在 Beta 5 中将 Swift 字典写入 NSUserDefaults

    我一直在开发一个应用程序 在该应用程序中我使用 NSUserDefaults 来保存字典以在程序的其他地方使用 自 Beta 1 以来 此功能一直运行良好 现在 随着最新的更新 beta 5 此功能不再有效 看来他们已经消除了以这种方式保存
  • 仍然是 Python 2.6 与 Python 3 吗?

    G day 我想在一段时间没有使用Python后回到Python 我看到了这个问题 适合新手的 Python 版本 https stackoverflow com questions 345255 python version for a
  • 如何使用 Spring security 更新过滤器的标头参数?

    我正在使用 Spring security 开发一个过滤器extends of OncePerRequestFilter类 它必须更新 REST 服务中的参数 参数由带有注释的标头输入 RequestHeader 我尝试使用以下类更新过滤器
  • 在 python3 中绘图(直方图)

    我正在尝试根据一系列成绩创建直方图 所有等级均为可能的 7 级 3 0 2 4 7 10 12 之一 我使用下面的代码来生成绘图 但是我无法找到一种方法将 x 轴标签放在条形图的中间 删除绘图中间的空间 或者在条形图之间放置一个小空间 im
  • 我可以让 Heroku Logs 仅返回概述错误的行吗?

    Heroku 日志是一个很好的资源 可以在出现问题时检查应用程序发生了什么情况 不幸的是 它们还记录了大量信息 有什么方法可以过滤日志以仅查找错误消息吗 尝试这个 heroku logs t grep error 获取错误发生时的运行列表
  • 我有 30 个注释,并且还在不断增加。正在寻找一种更简单的方法来编码吗?

    我正在将多个注释编码到一个项目中 目前我有 30 个注释 并且还在不断增加 我想知道是否有一种更简单的方法必须为每个注释创建 annotation h 和 annotation m 类 目前在我的地图视图控制器中 我创建注释对象并将它们放置
  • 如何使用 matlab 查找矩阵中唯一(不重复)的值

    每个人 假设我有以下 3x3 矩阵 A 0 1 3 0 0 3 0 0 0 我的问题是如何使用matlab找出该矩阵中的唯一值 在这种情况下 结果应该是 1 我尝试过使用 value unique A 但它返回的向量 0 1 3 不是我想要
  • CKAN 中的修订历史

    CKAN 是否提供数据集的修订历史记录 我看到一个表和一个 API 调用 但在修改数据集或元数据字段时 我在 UI 和 或数据库中看不到任何内容 编辑数据集的标题 您将看到包含添加到 package revision 表中的新值的行 然而
  • ASP.NET / iPad Safari 缓存问题?

    我们有一个使用 ASP NET Ajax 的 ASP NET Web 应用程序 我们从 iPad 上的 Safari 中打开它 效果很好 我们将其作为单独的图标保存到主屏幕上 我们添加了元标记 使其能够全屏加载 无需 Safari 的导航栏
  • C中不完整类型和对象类型的定义是什么?

    的定义是什么不完整型 and 对象类型在C语言中 另外 您能否提供一些例子 ANSI C99 在不同的地方提到了这两种类型类别 尽管我发现很难理解它们的确切含义 没有段落 句子明确定义它们是什么 让我们去在线 C 标准 草案 n1256 h
  • 如何查找 iPhone 应用程序 CPU 使用率 100% 的原因

    我在一个应用程序中诊断出一个奇怪的行为 大约 10 分钟后 CPU 使用率达到 100 应用程序中没有泄漏 并且它发生在应用程序不执行任何操作时 我可以使用 时间分析器 通过仪器对此进行分析 但是有没有办法找到实际原因是什么 使用 Inst
  • 如何在类路径中运行带有 jar 的 java 类?

    所以 我可以很好地做到这一点 java mypackage MyClass if mypackage MyClass class存在 我也可以愉快地这样做 java cp myjar jar mypackage MyClass 类文件是否存
  • NSMutableArray 和 NSPredicate 过滤

    我正在尝试使用对象中的两个实体来过滤我的数组 就像我有一个 Person 对象 其中有姓名 地 址 号码 电子邮件等 我正在尝试仅使用名称和号码来过滤我的对象数组列表 如何使用 NSPredicate 来实现这一点 创建谓词 以下假设您的P
  • 具有不同子项的 Sql XML 路径

    我已经完成了很多 XML PATH 语句 但这个语句我却忽略了 或者对于多个不同的子项来说甚至可能是不可能的 最终结果应该是这样的
  • 为所有架构编译 PJSIP 2.5 库

    要为 iPhone 设备编译 PJSIP 库 我使用此代码 make distclean make clean ARCH arch arm64 configure iphone enable opus codec make dep make