首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >libev-4.15无法在OSX 10.8上编译

libev-4.15无法在OSX 10.8上编译
EN

Stack Overflow用户
提问于 2013-05-21 09:36:27
回答 1查看 470关注 0票数 0

我正在尝试从libev-3.8 (它在OSX 10.8上编译得很好)升级到libev-4.15,并得到以下错误。

代码语言:javascript
复制
third_party/libev-4.15/ev.h:234: error: expected identifier before numeric constant
third_party/libev-4.15/ev.h:234: error: expected `}' before numeric constant
third_party/libev-4.15/ev.h:234: error: expected unqualified-id before numeric constant
third_party/libev-4.15/ev.h:842: error: expected declaration before ‘}’ token

链接到ev.h:http://cvs.schmorp.de/libev/ev.h?revision=1.171&view=markup

我的系统配置:

代码语言:javascript
复制
checking host system type... i386-apple-darwin12.3.0
checking target system type... i386-apple-darwin12.3.0
checking for ld used by gcc... /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld
checking if the linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) is GNU ld... no
checking how to convert i386-apple-darwin12.3.0 file names to i386-apple-darwin12.3.0 format... func_convert_file_noop
checking how to convert i386-apple-darwin12.3.0 file names to toolchain format... func_convert_file_noop
checking for /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld option to reload object files... -r

FWIW,同样的配置在CentOS5.6上编译得很好。

EN

回答 1

Stack Overflow用户

发布于 2013-05-22 04:59:33

问题是在OSX上,"ev.h“中声明的"EV_ERROR”与"/usr/include/sys/event.h“中声明的冲突。

作为修复,我不得不向前声明我使用的ev变量,而不是直接在我的源文件中包含ev.h。这就起到了作用。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16660816

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档