c++ - Trec_eval 使用 cygwin 出错

标签 c++ gcc cygwin information-retrieval

我正在使用 trec_eval.9.0 并尝试使用 cygwin 在其中运行 make 命令:

Arezo@DESKTOP-JNNKBAS /cygdrive/d/Trec_eval/trec_eval.9.0 
 $ make

但是出现了以下错误:

 In file included from sysfunc.h:21:0,
 from m_ndcg_cut.c:8:
 m_ndcg_cut.c:12:8: error: expected ‘)’ before ‘/’ token
 double log2(double x);
 ^
 In file included from sysfunc.h:21:0,
 from m_Rndcg.c:9:
 m_Rndcg.c:13:8: error: expected ‘)’ before ‘/’ token
 double log2(double x);
 ^
 In file included from sysfunc.h:21:0,
 from m_ndcg_rel.c:9:
 m_ndcg_rel.c:13:8: error: expected ‘)’ before ‘/’ token
 double log2(double x);
 ^
 In file included from sysfunc.h:21:0,
 from m_binG.c:9:
 m_binG.c:13:8: error: expected ‘)’ before ‘/’ token
 double log2(double x);
 ^
 In file included from sysfunc.h:21:0,
 from m_G.c:9:
 m_G.c:13:8: error: expected ‘)’ before ‘/’ token
 double log2(double x);
 ^
 Makefile:54: recipe for target 'trec_eval' failed
 make: *** [trec_eval] Error 1

最佳答案

尝试添加

#undef log2

sysfunc.h 中的 #include 部分之后

这帮助我编译了这个工具。

关于c++ - Trec_eval 使用 cygwin 出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33058014/

相关文章:

c++ - 如何将音频添加到使用 SinkWriter 创建的 mp4 文件?

windows - Windows下如何通过Cygwin安装运行Nmap程序?

c - 简单 printf() 的奇怪垃圾输出

c++ - 以编程方式更改图像源

c++ - Ruby on Rails 在后台工作 [resque + resque-status]

c - 如何访问映射内存中的位?

gcc - "Multiple include guards may be useful for"究竟是什么?

windows - 检测到 CYGWIN windows cygrunsrv sshd 服务器和 MS-DOS 样式路径

C++:从值类型指针转换为包含迭代器

gcc - __USE_XOPEN2K8的用途以及如何设置?