gpt4 book ai didi

c++ - libev-4.15 无法在 OSX 10.8 上编译

转载 作者:行者123 更新时间:2023-11-28 07:36:41 25 4
gpt4 key购买 nike

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

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

我的系统配置:

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 上编译正常。

最佳答案

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

作为修复,我必须转发声明我使用的 ev 变量,而不是直接在我的源文件之一中包含 ev.h。成功了。

关于c++ - libev-4.15 无法在 OSX 10.8 上编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16660816/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com