我的kod很简单,因为fu ...;)它应该没问题,但它不是错误文本
错误2错误LNK2019:未解析的外部符号“int cdecl cv :: createButton(类std :: basic_string,类std :: allocator> const&,void( cdecl *)(int,void *),void *,int,bool )“(createButton @ cv @@ YAHAEBV?$ basic_string @ DU?$ char_traits @ D @ std @@ V?$ allocator @ D @ 2 @@ std @@ P6AXHPEAX @ Z1H_N @ Z)在函数main C:中引用 . ..
void on_button(int, void*)
{
}
int main(int argc, const char** argv)
{
createButton("test",on_button);
waitKey(0);
return 0;
}
有谁能告诉我这里有什么不对吗?
1 回答
您没有链接库或不包括定义了createButton的源文件 .