Unable to find the symbols for the functions `cvSetOpenGlDrawCallback` , `cvSetOpenGlContext` , and `cvUpdateWindow`

Seems that the linker is still unable to find the symbols for the functions cvSetOpenGlDrawCallback , cvSetOpenGlContext , and cvUpdateWindow

Here the errors while I compile my opencv build:
[ 25%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/layers/prior_box_layer.cpp.o
/usr/bin/ld: CMakeFiles/opencv_highgui.dir/src/window.cpp.o: in function cv::setOpenGlDrawCallback(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, void (*)(void*), void*)': window.cpp:(.text._ZN2cv21setOpenGlDrawCallbackERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvPvES8_+0x43): undefined reference to cvSetOpenGlDrawCallback’
/usr/bin/ld: CMakeFiles/opencv_highgui.dir/src/window.cpp.o: in function cv::setOpenGlContext(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': window.cpp:(.text._ZN2cv16setOpenGlContextERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x35): undefined reference to cvSetOpenGlContext’
/usr/bin/ld: CMakeFiles/opencv_highgui.dir/src/window.cpp.o: in function cv::updateWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': window.cpp:(.text._ZN2cv12updateWindowERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x35): undefined reference to cvUpdateWindow’
collect2: error: ld returned 1 exit status
make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/build.make:164: lib/libopencv_highgui.so.4.7.0] Error 1
make[1]: *** [CMakeFiles/Makefile2:5872: modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…

Anyone have the same problems?

please post cmake output as text and cmake command.