首页 | 互联网 | IT动态 | IT培训 | Cisco | Windows | Linux | Java | .Net | Oracle | 软件测试 | C/C++ | 嵌入式开发 | 存储世界 | 服务器
网络设备 | IDC | 安全 | 求职招聘 | 数字网校 | 网页设计 | 平面设计 | 技术专题 | 电子书下载 | 教学视频 | 源码下载 | 搜索 | 博客 | 论坛
中国IT实验室Linux频道
Google
首页 入门 Linux编程 系统管理 网络管理 Linux认证 Unix/BSD Linux数据库 Linux集群 Linux手册 Linux下载 Ubuntu 论坛 专题 RSS
您现在的位置: 中国IT实验室 >> Linux >> 系统管理 >> 系统管理 >> 正文

Linux系统编译boa-0.94-13出错信息问题

    编译一个linux下的c系统,包含词法和语法分析模块,Linux上用bison和flex.

    yacc是一个文法分析器的生成器,bison即是yacc的GNU版本。Lex和YACC是用于构造词法分析机和语法解释器的工具,利用Lex和YACC你可以轻松的构造一个语法解释器。

    一开始make

    错误1:

    debian:/home/a/boa-0.94.13/src# make

    yacc -d boa_grammar.y

    make: yacc: Command not found

    make: *** [y.tab.c] Error 127

    解决方法:

    debian:/home/a/boa-0.94.13/src# apt-get install bison

    错误2:

    debian:/home/a/boa-0.94.13/src# make

    lex boa_lexer.l

    make: lex: Command not found

    make: *** [lex.yy.c] Error 127

    解决方法:

    debian:/home/a/boa-0.94.13/src# apt-get install flex

    错误3:

    debian:/home/a/sss/boa-0.94.13/src# make

    gcc -g -O2 -pipe -Wall -I. -c -o util.o util.c

    util.c:100:1: error: pasting "t" and "->" does not give a valid preprocessing token

    make: *** [util.o] Error 1

    解决方法:

    修改 src/compat.h

    找到

    #define TIMEZONE_OFFSET(foo) foo##->tm_gmtoff

    修改成

    #define TIMEZONE_OFFSET(foo) (foo)->tm_gmtoff

    然后

    debian:/home/a/sss/boa-0.94.13/src# make clean

    debian:/home/a/sss/boa-0.94.13/src# make

    出现:

    debian:/home/a/sss/boa-0.94.13/src# make

    make: Nothing to be done for `all'.

    说明make没有检查到需要编译的东西,库或者应用程序已经编译好了。

    make主要检查的是时间戳,只要target比依赖的文件时间靠后它就认为不需要编译。

【责编:Zenghui】
中国IT教育
相关产品和培训
文章评论
 友情推荐链接
 专题推荐

 ·防范Linux病毒 打造没有病毒的乐土…
 ·Linux Shell编程实用指南…
 ·Linux日志分析与管理
 ·揭密Linux内存管理
 ·邮件服务Sendmail应用配置
 ·Linux 安全管理…
 ·Linux 下DNS服务器架设攻略…
 ·Linux 下的路由的配置与应用…
 ·专题:Apache实用手册
 ·全面剖析Linux文件系统
 今日更新
 认证培训
 频道精选
 Windows频道导航