anolisos8.4安装ddd调试器_evarbnow的博客-爱代码爱编程
操作环境:
1.VMWare Workstation 16 Pro
2.AnolisOS-8.4-x86_64
3.GCC 8.4.1
安装过程
http://ftp.gnu.org/gnu/ddd/,下载最新的ddd-3.3.12.tar.gz后传进虚拟机,或者通过wget下载: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
make
sudo make install
过程中没报错的话,命令行执行ddd,即可启动ddd,对应的脚本所在路径可以在make install这一步的命令行执行结果中找到
依赖缺失
1.Cannot find termcap compatible library.
缺少termcap
wget http://ftp.gnu.org/gnu/termcap/termcap-1.3.1.tar.gz
tar -zxv -f termcap-1.3.1.tar.gz
cd termcap-1.3.1
./configure
make
sudo make install
2.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
yum install openmotif
yum install openmotif-devel
3.ddd install strclass.h error: friend declaration of ‘string common_prefix(…)’ specifies default arguments and isn’t a definition [-fpermissive]
这个主要是由于编译器版本的原因,编译器版本比所安装的ddd的版本要高
具体解决方案参考:friend函数声明指定了默认参数
https://stackoverflow.com/questions/23333949/the-correct-way-to-define-default-argument-for-a-friend-function-in-c
将默认参数去掉再重新编译
由于前面去掉了默认参数,所以这里只传了2个参数报错了,添加上去掉的默认值即可,即complete.C文件的第357行改为
common_pfx = common_prefix(common_pfx, completions[i], 0);
如下图所示:
继续编译,如果还是有错就继续按照上面的方法改过来即可,但是改的地方可能很多