在使用Ubuntu进行编译Freeswitch时,会遇到无法编译libfreeswitch的情况。
Making all in .
......
./.libs/libfreeswitch.so: undefined reference to `inflateReset'
./.libs/libfreeswitch.so: undefined reference to `inflateEnd'
./.libs/libfreeswitch.so: undefined reference to `inflateInit2_'
./.libs/libfreeswitch.so: undefined reference to `inflate'
./.libs/libfreeswitch.so: undefined reference to `zlibVersion'
./.libs/libfreeswitch.so: undefined reference to `inflateInit_'
collect2: ld returned 1 exit status
make[2]: *** [freeswitch] Error 1
解决办法是修改使用autoconf生成的Makefile:
将SWITCH_AM_LDFLAGS = -lm -lz修改为SWITCH_AM_LDFLAGS = -lm
在freeswitch_LDADD = libfreeswitch.la libs/apr/libapr-1.la \
$(am__append_20) 后面加上-lz。
阅读(8849) | 评论(0) | 转发(0) |