我正在使用 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/