我的 kod 很简单... ;) 应该没问题,但事实并非如此 这是错误文本
Error 2 error LNK2019: unresolved external symbol "int __cdecl cv::createButton(class std::basic_string,class 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) referenced in function main C:...
void on_button(int, void*)
{
}
int main(int argc, const char** argv)
{
createButton("test",on_button);
waitKey(0);
return 0;
}
谁能告诉我这里出了什么问题?
最佳答案
您没有链接库或没有包含定义了 createButton 的源文件。
关于c++ - 执行 createButton opencv visual 时未解析的外部符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21052911/