BTW, can you post the output of the pkg-config --libs opencv4 (or opencv) command?
pkg-config --libs opencv4
opencv