Cygwin:在types.h中的“loff_t”之前解析错误

时间:2010-11-09 10:12:18

标签: c cygwin

我试图在Cygwin下“make all”zebra.tar.gz。我收到了这个错误:

In file included from /usr/include/sys/types.h:440,
                 from /usr/include/zconf.h:364,
                 from /usr/include/zlib.h:34,
                 from getcoeff.c:29:
/usr/include/cygwin/types.h:39: error: parse error before "loff_t"

任何Cygwin专家都能解决这个问题吗?我今天刚刚安装了Cygwin,所以这是最新版本。

1 个答案:

答案 0 :(得分:1)

问题是 getcoeff.c 中的#define __linux__行,其效果是禁用 __ loff_t 的定义以及中的各种其他类型/usr/include/machine/types.h ,也许是因为在Linux上这些类型是在编译器中预定义的。

Cygwin当然不是Linux,即使它的目的是兼容性。这是一个应用程序定义像这样的系统配置宏的错误,这可能会给其他非Linux系统带来麻烦。