Ubuntu16.04下安装DDD(Data Display Debugger)

前两天在Linux公社论坛偶然间看到了DDD这个软件,根据介绍是一个gdb界面化的调试软件,这正是我找了好长时间的东西,有一个有界面的调试工具了,于是乎今天抽了个时间整了整,里面碰到了不少坑,下面一一说明一下。我使用的Ubuntu16.04,如果你使用的是CentOS可以参考:http://blog.csdn.net/unix21/article/details/8450040,本人也是参考这篇博客安装的。

好了,废话不多说,上干货。

第一步,下载安装包并解压

我们可以从http://ftp.gnu.org/gnu/ddd/下载我们需要的版本,我下载的是最新版本ddd-3.3.12.tar.gz

# wget http://ftp.gnu.org/gnu/ddd/ddd-3.3.12.tar.gz

# tar zxvf ddd-3.3.12.tar.gz

# cd ddd-3.3.12/

注意:解压时我们可以解压到任何地方。

第二步,配置

# ./configure --prefix=/usr/local/ddd

执行完这个后我们一般会遇到两个问题:

第一个错误提示

checking for tgetent in -lncurses... no
checking for tgetent in -lcurses... no
checking for tgetent in -ltermcap... no
checking for tgetent in -ltinfo... no
checking for termcap functions library... configure: error: No curses/termcap library found
出现这个问题的原因是缺少ncurses安装包,我们安装就OK。

sudo apt-get install libncurses5-dev

具体可参考:http://www.linuxidc.com/Linux/2012-04/58746.htm

第一个问题解决后,我们重新执行./configure --prefix=/usr/local/ddd,发现还有第二个问题,错误提示如下:

configure: error: The X11 library '-lX11' could not be found.
Please use the configure options '--x-includes=DIR'
and '--x-libraries=DIR' to specify the X location.
See the files 'config.log' and 'ddd/config.log'
for further diagnostics.
原因是缺少openmotif,继续安装

sudo apt-get install libmotif-dev
具体可参考: http://askubuntu.com/questions/146639/how-to-install-openmotif-on-12-04

以上两个问题解决后再次执行./configure --prefix=/usr/local/ddd,如下没有错误提示OK!


第三步,编译

# make

如果出现下面的错误提示


错误的内容是EOF没有声明,我们需要修改相应的文件。在ddd-3.3.3.12/ddd中找到strclass.C文件,使用vim打开后加上#define EOF -1,保存退出,重新make,OK!

第四步:安装

#sudo make install

注意这里一定要用sudo,否则会报错。

第五步,启动。

#cd /usr/local/ddd/bin

    #./ddd


启动成功了,至于怎么用还没有开始玩,不过给大家个连接:http://jingyan.baidu.com/article/d71306351ad61613fdf475f0.html

等玩熟了再写一篇,祝你安装成功!



评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值