maskdetection icon indicating copy to clipboard operation
maskdetection copied to clipboard

link to opencv fails

Open bhomass opened this issue 5 years ago • 4 comments

I build opencv from scratch, and everything seems ok. I was able to build caffe right afterwards.

Now after updating all the CMakefile.txt's, I started building maskdetect. It went all the way thru to [100%] Linking CXX executable ../bin/mask but throw a bunch of opencv related errors

[100%] Linking CXX executable ../bin/mask /home/bruce/maskdetection/build/lib/libface_mask.so: undefined reference to cv::_OutputArray::_OutputArray(cv::Mat&)' /home/bruce/maskdetection/build/lib/libface_mask.so: undefined reference to cv::split(cv::Mat const&, std::vector<cv::Mat, std::allocatorcv::Mat >&)' /home/bruce/maskdetection/build/lib/libface_mask.so: undefined reference to cv::_InputArray::_InputArray(cv::Mat const&)' /home/bruce/maskdetection/build/lib/libface_mask.so: undefined reference to vtable for cv::_InputArray' collect2: error: ld returned 1 exit status test/CMakeFiles/mask.dir/build.make:105: recipe for target 'bin/mask' failed

it appears that it can not find the right opencv object files to link to. in particular _OutputArray is a part of core. But I have that object file spelled out in test/CMakefile.txt

TARGET_LINK_LIBRARIES(mask /usr/local/lib/libopencv_core.so

and I checked many time to make sure that path and creation date are all correct.

Why does the linker keep complaining about this?

bhomass avatar May 04 '20 02:05 bhomass

Did you try to add opencv highgui ,imgproc,imgcodecs?

2016110071 avatar May 14 '20 12:05 2016110071

@bhomass hey I am having trouble running the make command, can you please share the steps you took to even the build started? Do I need to build each of the requirements from the source? especially I need help with configuring the include directories option in the cmake file.

Any help would be really great.

abhianand7 avatar Jul 23 '20 07:07 abhianand7

never worked for me. sorry.

bhomass avatar Jul 23 '20 07:07 bhomass

@bhomass no worries thanks for replying though.

abhianand7 avatar Jul 23 '20 07:07 abhianand7