link to opencv fails
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?
Did you try to add opencv highgui ,imgproc,imgcodecs?
@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.
never worked for me. sorry.
@bhomass no worries thanks for replying though.