在ARM上安裝minicom及“error: conflicting types for ‘getline‘”解決
root@zhaoxc-VBox:/opt/arm-tools/ncurses-6.0# ./configure --host=arm-none-linux-gnueabi --prefix=/opt/arm-tools/ncurses-6.0/install-arm
root@zhaoxc-VBox:/opt/arm-tools/ncurses-6.0# make
root@zhaoxc-VBox:/opt/arm-tools/ncurses-6.0# make install
root@zhaoxc-VBox:/opt/arm-tools/minicom-2.1# ./configure --host=arm-none-linux-gnueabi --prefix=/opt/arm-tools/minicom-2.1/install-arm CPPFLAG=-I/opt/arm-tools/ncurses-6.0/install-arm/include/ncures LDFLAGS=-L/opt/arm-tools/ncurses-6.0/install-arm/lib
注1:根據(jù)網(wǎng)上的參考方法,復(fù)制本機/usr/share/terminfo下的v目錄老是出錯。復(fù)制/lib/terminfo下的v目錄,解決問題。
注2:編譯出錯“minicom.c: 156:13: error: conflicting types for ‘getline’”
這是因為minicom.c中的getline和系統(tǒng)中的庫函數(shù)名沖突,所以將文件中所有的getline改為getlines,成功解決問題。
將本機/lib/terminfo下的v目錄復(fù)制到ARM的/usr/share/terminfo下:
在/etc/profile里面添加:
export TERM=vt100
export TERMINFO=/usr/share/terminfo
source /etc/profile立即生效
評論