2013-06-12 36 views
1

在爲Asterisk 1.8生成smsq的同時,我得到的第一個錯誤是missing pots.h。我通過安裝libpopt-dev sudo apt-get install libpopt-dev解決了這個問題。現在我越來越無法在星號1.8上生成utils/smsq

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 

回答

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啓用它的帽子XXX,這表明與smsq構建問題。我想常識觸發建立星號將設置短信引用popt $$$$ ld的鏈接。在make install之前啓用它也是有道理的。