AlanLuSun / High-quality-ellipse-detection

A high-quality ellipse detector based on arc-support line segments which can both accurately and efficiently detect ellipses in images.
456 stars 145 forks source link

undefined reference to `cv:: #22

Closed GJpku closed 4 years ago

GJpku commented 4 years ago

This problem occurs during mex. I need your help. Thanks in advance. The environment is VS2012 and Matlab2019a. The compile command I used is:

mex generateEllipseCandidates.cpp -ID:\OpenCV\opencv2.4.9\build\include -ID:\OpenCV\opencv2.4.9\build\include\opencv -ID:\OpenCV\opencv2.4.9\build\include\opencv2 -LD:\OpenCV\opencv2.4.9\build\x64\vc11\lib -I"D:\Program files\R2019a\extern\include" -L"D:\Program files\R2019a\extern\lib\win64\microsoft" -lopencv_core249 -lopencv_highgui249 -lopencv_imgproc249 -llibmwlapack.lib

A typical error is listed below:

错误使用 mex C:\Users\GJ\AppData\Local\Temp\mex_13496228189246_15708\generateEllipseCandidates.obj:generateEllipseCandidates.cpp:(.text+0x9528): undefined reference to `cv::Exception::Exception(int, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, int)

GJpku commented 4 years ago

I've solved this problem. This is because my VS2012 compiler is uncorrectedly configurated in Matlab. Mex finnaly worked after this was reset.