Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/157.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/28.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 没有匹配函数错误_C++_Linux - Fatal编程技术网

C++ 没有匹配函数错误

C++ 没有匹配函数错误,c++,linux,C++,Linux,我有这段代码,我正试图用G++-4.7在Linux上编译它: TermToGeneCount *tg = new TermToGeneCount(); TermToGeneCount *tgn = new TermToGeneCount(); Dag<int64_t>* dags = new Dag<int64_t>(); //.... getTermToGeneCount(nwPar.getAnnotationRetriever(),dags,tg,tgn); Ter

我有这段代码,我正试图用
G++-4.7
Linux
上编译它:

TermToGeneCount *tg = new TermToGeneCount();
TermToGeneCount *tgn = new TermToGeneCount();
Dag<int64_t>* dags = new Dag<int64_t>();
//....
getTermToGeneCount(nwPar.getAnnotationRetriever(),dags,tg,tgn);
TermToGeneCount*tg=newtermtogenecount();
TermToGeneCount*tgn=新的TermToGeneCount();
Dag*dags=新的Dag();
//....
getTermToGeneCount(nwPar.getAnnotationRetriever(),dags,tg,tgn);
其中,getTermToGeneCount在与以下名称相同的命名空间中定义:

void DefaultNwBuilder::getTermToGeneCount(const JavaWrapping::javaAnnotationRetrieverWrapper& annRetriever, Dag<int64_t>* dags, TermToGeneCount* tg, TermToGeneCount* tgn) const{
    //..
    }
void DefaultNwBuilder::getTermToGeneCount(常量JavaWrapping::javaAnnotationRetrieverWrapper&annRetriever,Dag*dags,TermToGeneCount*tg,TermToGeneCount*tgn)常量{
//..
}
编译时,会出现以下错误:

error: no matching function for call to ‘cnw::DefaultNwBuilder::getTermToGeneCount(const JavaWrapping::javaAnnotationRetrieverWrapper&, Dag<long int>*&, TermToGeneCount*&, TermToGeneCount*&)’
note: candidates are:
错误:调用“cnw::DefaultNwBuilder::getTermToGeneCount(const JavaWrapping::javaAnnotationRetrieverWrapper&,Dag*&,TermToGeneCount*&,TermToGeneCount*&)”时没有匹配的函数
注:候选人包括:
我认为问题在于第二个参数,因为如果我删除它(从调用和方法定义中删除),它就可以工作


你能帮帮我吗

可能是32位与64位平台编译类型的问题。错误中的
long int
不一定映射到
int64\t

您能显示完整且未编辑的错误消息吗?有哪些候选项?是否在DefaultNwBuilder的方法中调用getTermToGeneCount?从错误消息中没有提供候选项,我刚刚清除了文件名和行号@MikeP是的,它是。通常有效:您需要提供更多的上下文,正如@JoachimPileborg提到的。您是否包括定义
DefaultNwBuilder
类的头文件(以及声明的
getTermToGeneCount
函数`)?它是在类中声明的?那将是一个链接器错误,不是吗?我怀疑这会在编译阶段出现。此外,gcc在错误消息中用typedef'd类型替换
int64_t
——另一方面,请参见,OP提到,当删除包含
int64_t
的参数时,它会起作用。。。