gpt4 book ai didi

c++ - Trec_eval 使用 cygwin 出错

转载 作者:行者123 更新时间:2023-11-28 06:02:08 25 4
gpt4 key购买 nike

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

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com