centos ddd 安装,注意版本

开始安装,问题很多,后来发现是版本太旧,用了下边的版本就可以了:

1. 下载DDD源码: http://ftp.gnu.org/gnu/ddd/.现在的最新版本: ddd-3.3.12.tar.gz
2. 解压缩源码: tarxzf ddd-3.3.12.tar.gz
3. 进入 ddd-3.3.12目录,运行 ./configure
   报错: configure: error: The Motif include file'Xm/Xm.h'
  解决:缺少Motif开发库,安装 openmotif,和 openmotif-devel软件包。
sudo yum installopenmotif
sudo yum installopenmotif-devel 
   重新 configure
4. make
报错: g++ -DHAVE_CONFIG_H -I. -I./..    -O2-g -Wall -W -Wwrite-strings -trigraphs  -MT strclass.o -MD -MP -MF .deps/strclass.Tpo -c -ostrclass.o strclass.C
strclass.C: In function‘std::istream&operator>>(std::istream&,string&)’:
strclass.C:1546: error:‘EOF’ was not declared in this scope
strclass.C:1559: error: ‘EOF’ was not declaredin this scope
strclass.C: In function ‘intreadline(std::istream&, string&,char, int)’:
strclass.C:1589: error: ‘EOF’ wasnot declared in this scope
strclass.C:1602: error: ‘EOF’ was not declaredin this scope
make[2]: *** [strclass.o] Error 1
make[2]: Leaving directory`/home/programer/install-package/ddd/ddd-3.3.12/ddd'
make[1]: *** [all] Error 2
make[1]: Leaving directory`/home/programer/install-package/ddd/ddd-3.3.12/ddd'
make:*** [all-recursive] Error 1

解决: strclass.C文件缺少C头文件。
打开 strclass.C,在如下位置加入 #include<cstdio>

#include"strclass.h"
#include"config.h"
#include<ctype.h>
#include<cstdio>
#include<limits.h>
#include<new>
#include<stdlib.h>

makeclean
make

看到如下内容表示成功:
make[2]: Leaving directory`/home/programer/install-package/ddd/ddd-3.3.12/ddd'
make[1]: Leaving directory`/home/programer/install-package/ddd/ddd-3.3.12/ddd'
make[1]: Entering directory`/home/programer/install-package/ddd/ddd-3.3.12'
make[1]: Nothing to be done for`all-am'.
make[1]: Leaving directory`/home/programer/install-package/ddd/ddd-3.3.12'

5. sudo make install

Enjoy it.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值