PJSIP 在Linux系统下编译
准备
?pjproject-1.8.10.tar.bz2 解压到目录/home/pjsip。
# cd /home
# mkdir pjsip
# tar jxvf <pjproject-1.8.10.tar.bz2> -C /home/pjsip
在pjlib/include/pj 目录添加config_site.h文件,无需任何内容。
# cd /home/pjsip/pjproject-1.8.10/pjlib/include/pj
# vi config_site.h
开始编译# cd /home/pjsip/pjproject-1.8.10
# ./configure
# make dep
# make 编译失败报如下错误:In file included from src/pa_linux_alsa.c:1:
src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c: ?úoˉêy ??PaAlsaStreamComponent_FinishConfigure?ˉ ?D£o
src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c:1367: ′í?ó£o??SND_PCM_TSTAMP_ENABLE?ˉ ?′éù?÷ (?ú′?oˉêy?úμúò?′?ê1ó?)
src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c:1367: ′í?ó£o(?′ê1?úò???oˉêy?ú?à′?3???£??????′éù?÷μ?±êê?·??ú??
src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c:1367: ′í?ó£o?ù?úμ?oˉêy?ú??±¨??ò?′??£)
make[3]: *** [output/libportaudio-i686-pc-linux-gnu/pa_linux_alsa.o] ′í?ó 1
make[3]: Leaving directory `/home/mzxue/pjproject-1.8.10/third_party/build/portaudio'
make[2]: *** [libportaudio] ′í?ó 2
make[2]: Leaving directory `/home/mzxue/pjproject-1.8.10/third_party/build/portaudio'
make[1]: *** [all] ′í?ó 1
make[1]: Leaving directory `/home/mzxue/pjproject-1.8.10/third_party/build'
make: *** [all] ′í?ó 1
然后修改文件:pjproject-1.8.10\third_party\portaudio\src\hostapi\alsa\pa_linux_alsa.c 在函数PaAlsaStreamComponent_FinishConfigure中将:
SND_PCM_TSTAMP_ENABLE 改为 SND_PCM_TSTAMP_MMAP
然后再重新编译即可