Hello everyone, The OpenCV version I'm currently using is OpenCV 3.4 .
I'm trying to compile a sample program from github. But, I'm receiving the following errors:
/tmp/cctdl0lP.o: In function createBGSubtractorByName(cv::String const&)':
bgfg.cpp:(.text+0xfd): undefined reference to
cv::bgsegm::createBackgroundSubtractorGMG(int, double)'
bgfg.cpp:(.text+0x190): undefined reference to cv::bgsegm::createBackgroundSubtractorCNT(int, bool, int, bool)'
bgfg.cpp:(.text+0x2b8): undefined reference to
cv::bgsegm::createBackgroundSubtractorMOG(int, int, double, double)'
collect2: error: ld returned 1 exit status
I found the similar problem referred here. And hence I included the following:
ifdef _DEBUG
pragma comment(lib, "opencv_bgsegm340d.lib")
else
pragma comment(lib, "opencv_bgsegm340.lib")
endif
Yet, the problem doesn't seem to be solved. Kindly, help.
Thanks in advance.