gpt4 book ai didi

ios - PJSIP 集成在 xcode 7 中运行的正确指导步骤

转载 作者:行者123 更新时间:2023-11-29 00:45:22 25 4
gpt4 key购买 nike

I had tried to compile pjsip library.but getting error. when run

$ cd /pjproject-2.5.5
$ ./configure-iphone
//error: -bash: -bash: ./configure-iphone: Permission denied
$ chmod +x configure-iphone //then i tried this
$ ./configure-iphone
//error:-bash: ./configure-iphone: /bin/bash^M: bad interpreter: No such file or directory.

Please give me proper guide line by steps to run pjsip ios project.

最佳答案

为 iPhone 编译 pjsip

1. 从以下链接之一下载源代码:

http://www.pjsip.org/download.htm

http://trac.pjsip.org/repos/wiki/Getting-Started/Download-Source

2.使用以下代码在项目文件夹 /pjlib/include/pj/ 中创建一个新文件 config_site.h:

#define PJ_CONFIG_IPHONE 1 
#include <pjconfig_site_sample.h>

3.构建PJSIP

打开终端:

$ cd /path/to/your/pjsip/dir
$ ./configure-iphone

您可能会遇到以下问题:

a) 权限被拒绝

Solution: preface the login with sudo 
or login as super user using su command and the type following command
$ su
Password:
# chmod 777 configure-iphone
# exit

b) -bash: ./configure-iphone:/bin/bash^M: 错误的解释器:没有那个文件或目录

(出现此错误的原因可能是在configure-iphone文件中的每一行都可能附加了字符$或者可能是回车符) 要检查这一点,请执行以下操作:

$ vim configure-iphone
(It wil open the vim editor)
To see the last character press escape(ESC:)set list
To quit vim press Esc:q

然后消除

$ tr -d '\r' <configure-iphone >FILE.new

(它将创建名为 FILE 的新文件。现在,使用以下命令删除configure-iphone 文件并将 FILE 重命名为configure-iphone:)

 $ rm configure-iphone
$ mv FILE.new configure-iphone

(再次确认新创建的文件是否有777权限,如果没有则从 super 用户分配)

$ ./configure-iphone

同样,./configure-iphone 中可能存在错误:权限被拒绝

Solution : Assign 777 permission to the whole folder. 
- $ cd .. (Go to the parent folder in which the PJSIP folder lies)
- $ su (login as super user)
- # chmod 777 * (It will assign 777 permission to the whole folder and its content)
Alternatively:
- $ chmod u+x configure-iphone

再次运行 $ ./configure-iphone 命令。这次一切都应该正常。

4.制作

make dep && make clean && make

来源:http://gaurav-iphone.blogspot.com.au/2011/09/compiling-pjsip.html

关于ios - PJSIP 集成在 xcode 7 中运行的正确指导步骤,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38671144/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com