I upgraded my PC to Ubuntu 20.04 and I installed OpenCV 4.2.0 which compiles correctly but when I try to compile a program that depends on it it gives me an error
undefined reference to
cv::imwrite(std::__cxx11::basic_string<char, std::char_traits<char>,../utils/aruco_test.cpp: In function ‘int main(int, char**)’: .../utils/aruco_test1.cpp:324:21: warning: unused variable ‘optierro’ [-Wunused-variable] int optierro = 6; ^~~~~~~~ std::allocator<char> > const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)' /usr/bin/ld: ../src/libaruco.so.3.0.12: undefined reference to
cv::imshow(std::__cxx11::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&, cv::_InputArray const&)' /usr/bin/ld: ../src/libaruco.so.3.0.12: undefined reference to `cv::waitKey(int)'
I'm trying to compile ArUco from source which worked on my previous machine with ubuntu 16.04.
First I used the gcc version installed by default gcc-8 (for both OpenCV and ArUco) and then gcc-7 and I get the same erros.
Does anyone know why is that happen?