cd /home/musictom
mkdir gdb-7.4-i386-pc-cygwin-out
cd gdb-7.4-i386-pc-cygwin-out
../gdb-7.4/configure --with-gmp=/usr/local --with-mpc=/usr/local/ --with-mpfr=/usr/local/ --prefix=/usr/local/gcc-4.7.1-i386-pc-cygwin/ --with-build-libsubdir=/usr/local/lib/
make
make install
中途会遇到错误:configure: error: no termcap library found
重新安装下cygwin,把 ncurses 包选上即可,如果是在Linux里:
一、如果你的系统是 RedHat 系列:
yum list|grep ncurses
yum -y install ncurses-devel
yum install ncurses-devel
二、如果你的系统是 Ubuntu 或 Debian :
apt-cache search ncurses
apt-get install libncurses5-dev