I’m writing a C++ code using grpc and opencv. I proceeded with the build with cmake and make. I specified the required library and the path of the so file well.
$ cmake -DCMAKE_PREFIX_PATH=$MY_INSTALL_DIR ../..
$ make -j 4
The following error occurs when entering “make -j 4”.
/usr/bin/ld: /usr/local/lib/libopencv_core.so: undefined reference to `std::condition_variable::wait(std::unique_lockstd::mutex&)@GLIBCXX_3.4.30′
Additionally, if I write a code that only uses opencv and proceed with compilation with g++, it runs well.
I don’t have a problem adding headers, but I get this error if I only write code like cv::Mat.
I’ve added this and that library to CMakeLists.txt, and I’ve added paths to environment variables.