小编Mee*_*epo的帖子

错误:未知类型名称'bool'

我下载了源代码并想编译扫描程序文件.它会产生以下错误:

[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.
Run Code Online (Sandbox Code Playgroud)

我尝试使用不同的编译器来编译它,但它出现了不同的错误.

[meepo@localhost cs143-pp1]$ g++ -o scan lex.yy.c -ll
/usr/bin/ld: cannot find -ll
collect2: ld returned 1 exit status
Run Code Online (Sandbox Code Playgroud)

我的操作系统是3.0-ARCH,我不知道为什么会这样.我该如何修复错误?

c gcc lex

69
推荐指数
4
解决办法
17万
查看次数

标签 统计

c ×1

gcc ×1

lex ×1