使用cygwin时Trec_eval会出错

时间:2015-10-10 19:20:16

标签: 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

1 个答案:

答案 0 :(得分:1)

尝试添加

#undef log2
#include

sysfunc.h部分之后

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