Compiling pjsip for iOS 4.0

孤者浪人 提交于 2019-12-21 17:21:30

问题


I've been having issues with compiling pjsip for iOS 4.0.

I am using the latest trunk version from SVN and keep getting a portaudio error. When using the piedmontwireless guide: http://www.piemontewireless.net/PJSip155_and_iPhoneSDK312 I get a missing separator error in my build.mak file, which would indicate a whitespace/tabbing error, but for the life of me I cannot find it.

According to the pjsip mailing lists, you should be able to compile out of the box for iOS 4.0, but I get this error:

 ../src/pjmedia-audiodev/errno.c:23:26: error: portaudio.h: No such file or directory
../src/pjmedia-audiodev/errno.c: In function ‘pjmedia_audiodev_strerror’:
../src/pjmedia-audiodev/errno.c:104: warning: implicit declaration of function ‘Pa_GetErrorText’
make[2]: *** [output/pjmedia-audiodev-arm-apple-darwin9/errno.o] Error 1
make[1]: *** [pjmedia-audiodev] Error 2

I'll keep punching through this but any help would be really appreciated.

EDIT: I do have portaudio.h


回答1:


./configure-iphone

Fresh from SVN

Configurations for current target have been written to 'build.mak', and 'os-auto.mak' in various build directories, and pjlib/include/pj/compat/os_auto.h.

Further customizations can be put in:
  - 'user.mak'
  - 'pjlib/include/pj/config_site.h'

The next step now is to run 'make dep' and 'make'.

Done configuring for iPhoneOS4.2.sdk

Shouldn't ./configure-iphone setup pjlib/include/pj/config_site.h

As

#define PJ_CONFIG_IPHONE 1
#include <pj/config_site_sample.h>

Thanks for the fix @Schroedinger




回答2:


The specific step you are missing is to have a config_site.h file in the proper location.

pjlib/include/pj/config_site.h

It needs to contain the following:

#define PJ_CONFIG_IPHONE 1
#include <pj/config_site_sample.h>

So the configuration will avoid libraries that are not needed or won't compile for the arm chip in the iPhone.

After this addition start over with:

./configure-iphone

and then

make dep && make clean && make


来源:https://stackoverflow.com/questions/3251541/compiling-pjsip-for-ios-4-0

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!