我下载了源代码,并希望编译扫描程序的文件。它产生此错误:
[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>