Ask Your Question
0

Errors in Converting console application to windows form application C++

asked 2013-06-03 12:02:03 -0600

123ezone gravatar image

Hi, I am doing OCR application using opencv 2.4.3 in visual c++ windows forms(visual studio 2010 ultimate). I did this OCR application as a c++ console application and it works fine. But when I was converting it to windows forms it gives this error.

Error 1 error LNK2001: unresolved external symbol "public: virtual void __thiscall cv::HOGDescriptor::setSVMDetector(class cv::_InputArray const &)" (?setSVMDetector@HOGDescriptor@cv@@UAEXABV_InputArray@2@@Z)

Can someone help me to fix this error.I have no idea of correcting that error.I used same additional libraries which I used for console application here also.Thank You

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2013-06-04 08:50:15 -0600

WinForms do not cope well with openCV from my experience, but try to watch on the following things, which helped me out.

  • In order to cope between data and form, paste all your processing of openCV inside the header. It is indeed a weird way of working, but it is a Microsoft thing...
  • Do not add on top of your code the line using namespace cv, it will screw up your functions. Instead, call each openCV function by adding cv::FunctionName.
  • Check your includes again, there is a big chance you have a typo somewhere in your list.
  • Did you use the debug libraries in release mode or vice versa?

Get back at me if more problems arise, maybe add a link to a pastebin of your code?

edit flag offensive delete link more
0

answered 2016-01-08 02:22:21 -0600

Add the library file "opencv_objdetect2xx.lib; opencv_objdetect2xxd.lib;" in Project properties-->Linker-->Input.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-06-03 12:02:03 -0600

Seen: 1,635 times

Last updated: Jun 04 '13