【发布时间】:2011-12-29 07:18:05
【问题描述】:
我下载了源代码,想编译扫描仪的文件。它会产生这个错误:
[meepo@localhost cs143-pp1]$ gcc -o lex.yy.o lex.yy.c -ll
In file included from scanner.l:15:0:
scanner.h:59:5: error: unknown type name ‘bool’
In file included from scanner.l:16:0:
utility.h:64:38: error: unknown type name ‘bool’
utility.h:74:1: error: unknown type name ‘bool’
In file included from scanner.l:17:0:
errors.h:16:18: fatal error: string: No such file or directory
compilation terminated.
并且我尝试使用不同的编译器来编译它,但它出现了不同的错误。
[meepo@localhost cs143-pp1]$ g++ -o scan lex.yy.c -ll
/usr/bin/ld: cannot find -ll
collect2: ld returned 1 exit status
我的操作系统是 3.0-ARCH,我不知道为什么会这样。如何修复错误?
【问题讨论】:
-
#include <stdbool.h>