user3183211
user3183211

Reputation: 11

Unresolved external symbol while doing createButton opencv visual

my kod is simple as fu... ;) and it should be ok, but it is not here is error text

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;
}

is anyone able to tell me whats wrong here?

Upvotes: 1

Views: 785

Answers (1)

Ilya Kobelevskiy
Ilya Kobelevskiy

Reputation: 5345

You are not linking library or are not including source file where createButton is defined.

Upvotes: 2

Related Questions