libev-4.15 无法在 OSX 10.8 上编译
libev-4.15 doesn't compile on OSX 10.8
我正在尝试从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
原来问题是OSX上"EV_ERROR"声明在" ev_h "与"/usr/include/sys/event.h"声明的EV_ERROR冲突。
作为修复,我必须转发声明我使用的ev变量,而不是在我的一个源文件中直接包括ev.h。
相关文章:
- 如何在 OSX 10.15 中使用 Clang -Wno-nullability-completeness 选项编译整个
- 在 OSX 上编译C++时找不到库
- Cmake Mac OSX库链接问题:在Linux上进行编译,但在Mac上进行了编译
- 如何在OSX上为clang编译 #include < 实验/任意>
- 构建共享对象 - 使用 Ninja 编译适用于 OSX 和 Windows 上的 Ubuntu Crush
- OSX 上的 Apache Ignite 2.0 C++ 无法编译
- 在新OSX上编译旧碳应用
- 代码调用反向函数不会在Ubuntu 18上的G 或Clang 上编译,但神秘地在Mac OSX上使用
- 如何为 OSX 编译 QCustomPlot
- 使用 gcc4.2 在 OsX 10.9 上编译 Qt5.2 项目
- 在 OSX 10.9.1 上使用 g++ 编译时出错:未知类型名称'__darwin_wctype_t'
- 为什么 OSX Mavericks 无法编译我的 GLSL 着色器?
- 无法在osx mavericks上编译tokumx/mongodb
- 从 Windows 编译 OSX 的C++
- 在我的Mac OSX El Capitan上编译带有意外错误的简单C++类
- 提升日志记录无法在 OSX 上编译
- C++程序需要很长时间才能在Mac OSX终端上编译
- 无法在我的 OSX 中编译"hello world" cpp
- 无法在 OSX 上运行编译的 C++ 可执行文件,适用于 Debian
- 如何使用 cmake 在 OSX 上编译 glfw