在为Asterisk 1.8构建smsq时,我得到的第一个错误是missing pots.h
。我通过安装libpopt-dev sudo apt-get install libpopt-dev
解决了这个问题。现在我正在
desktop:~/Development/asterisk/asterisk-1.8.22.0$ sudo make utils/smsq
gcc utils/smsq.c -o utils/smsq
/tmp/cc87NdXn.o: In function `main':
smsq.c:(.text+0x25fe): undefined reference to `poptHelpOptions'
smsq.c:(.text+0x2634): undefined reference to `poptGetContext'
smsq.c:(.text+0x2652): undefined reference to `poptSetOtherOptionHelp'
smsq.c:(.text+0x2661): undefined reference to `poptGetNextOpt'
smsq.c:(.text+0x2682): undefined reference to `poptStrerror'
smsq.c:(.text+0x269b): undefined reference to `poptBadOption'
smsq.c:(.text+0x294b): undefined reference to `poptPeekArg'
smsq.c:(.text+0x295e): undefined reference to `poptGetArg'
smsq.c:(.text+0x298a): undefined reference to `poptPeekArg'
smsq.c:(.text+0x299d): undefined reference to `poptGetArg'
smsq.c:(.text+0x2c9d): undefined reference to `poptPeekArg'
smsq.c:(.text+0x2cb9): undefined reference to `poptGetArg'
smsq.c:(.text+0x2da1): undefined reference to `poptPeekArg'
smsq.c:(.text+0x2dc5): undefined reference to `poptPeekArg'
smsq.c:(.text+0x2dd8): undefined reference to `poptGetArg'
collect2: ld returned 1 exit status
make: *** [utils/smsq] Error 1
答案 0 :(得分:1)
我明白了,以下步骤有所帮助。
make clean
./configure --with-bluetooth **note that bluetooth has nothing to do with this issue, I need it for chan_mobile**
sudo make
make menuconfig -> Utilities -> smsq enable it
sudo make install
cd utils **note do not use make utils/smsq, it wont work**
make smsq **its now built**
sudo cp smsq /usr/bin/asterisk/
基本上,menuconfig没有启用smsq,因为它表明了smsq的构建问题。我猜常识触发了星号构建星号将为ld设置smsq对 popt $$$$ 链接的引用。在make install之前启用它也是有意义的。