我正在使用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
答案 0 :(得分:1)
尝试添加
#undef log2
在#include
中sysfunc.h
部分之后
这帮助我编译了这个工具。