1
votes

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?

1
oh dear, you probably forgot to link opencv_highgui. but then, createButton is only available with [qt] (docs.opencv.org/modules/highgui/doc/qt_new_functions.html) so you probably can't even use it - berak
i linked highgui, but it may be the problem. do you know is there any function similiar to createButton, but for visual? so far i did not found any - user3183211
there's only createTrackbar() in opencv. that's it. or draw a rect and set a mousehandler on the window - berak
at first i smiled a little but then i realized its in fact smart idea ;) thanks a lot, have a good night! - user3183211

1 Answers

2
votes

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