Ubuntu16.04下安装DDDData Display Debugger

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

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

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

我们可以从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

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

相关文章

目录前言一、创建Hadoop用户二、更新apt和安装Vim编辑器三、...
原文连接:https://www.cnblogs.com/yasmi/p/5192694.html ...
电脑重启后,打开VirtualBox,发现一直用的虚拟机莫名的消失...
参见:https://blog.csdn.net/weixin_38883338/article/deta...
Ubuntu 18.04 LTS 已切换到 Netplan 来配置网络接口。Netpla...
介绍每个 Web 服务都可以通过特定的 URL 在 Internet 上访问...