• 博客园logo
  • 会员
  • 周边
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
demps_c
博客园    首页    新随笔    联系   管理    订阅  订阅
安装ddd

  

Linux安装DDD

  (2013-06-24 11:51:35)
转载▼
标签: 

it

分类: 电子电脑

原文转自:http://blog.csdn.net/unix21/article/details/8450040

 

dd是一个优秀的调试器,安装ddd破费周折

必须安装x开发环境

 

1.下载

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/

 

2.配置

#./configure

 

安装缺失文件

1).如果configure的时候报错:
You must set the environment variable CXX to a working C++ compiler
这说明缺少C++编译器

#yum install gcc-c++

 

2).如果configure的时候报错:

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安装包

#yum list|grep ncurses
#yum -y install ncurses-devel
#yum install ncurses-devel


 

3).如果configure的时候报错:

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.安装

#make

#make install

 

如果make报错如下:
g++ -DHAVE_CONFIG_H -I. -I./.. -O2 -g -Wall -W -Wwrite-strings -trigraphs -MT strclass.o -MD -MP -MF .deps/strclass.Tpo -c -o strclass.o strclass.C
strclass.C: In function ‘std::istream& operator>>(std::istream&, string&)’:
strclass.C:1546: 错误:‘EOF’在此作用域中尚未声明
strclass.C:1559: 错误:‘EOF’在此作用域中尚未声明
strclass.C: In function ‘int readline(std::istream&, string&, char, int)’:
strclass.C:1589: 错误:‘EOF’在此作用域中尚未声明
strclass.C:1602: 错误:‘EOF’在此作用域中尚未声明
make[2]: *** [strclass.o] 错误 1
make[2]: Leaving directory `/usr/ddd-3.3.12/ddd'
make[1]: *** [all] 错误 2
make[1]: Leaving directory `/usr/ddd-3.3.12/ddd'
make: *** [all-recursive] 错误 1

 

错误内容是说EOF没有声明,文件是strclass.C

解决方法:

#find -name strclass.C

找到路径后编辑在改文件头部加入 #define EOF -1

 

终于可以make成功了!

 

4.启动

#ddd

成功启动界面

posted on 2014-09-20 16:13  demps_c  阅读(366)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3