Skip to content

Compile error of high gui with QT #10648

@csukuangfj

Description

@csukuangfj

System information (version)

  • OpenCV => master
  • Operating System / Platform => macOS
  • Compiler => clang

Error log

[ 76%] Built target opencv_videoio
[ 76%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_QT.cpp.o
/Users/xxx/software/opencv/modules/highgui/src/window_QT.cpp:970:29: error: 
      no member named 'mapToGlobal' in 'ViewPort'
    QPoint org = w->myView->mapToGlobal(new QPoint(0, 0));
                 ~~~~~~~~~  ^
/Users/xxx/software/opencv/modules/highgui/src/window_QT.cpp:970:21: error: 
      'myView' is a private member of 'CvWindow'
    QPoint org = w->myView->mapToGlobal(new QPoint(0, 0));
                    ^
/Users/xxx/software/opencv/modules/highgui/src/window_QT.h:346:15: note: 
      declared private here
    ViewPort* myView;
              ^
/Users/xxx/software/opencv/modules/highgui/src/window_QT.cpp:976:22: error: 
      'myView' is a private member of 'CvWindow'
    return cvRect(w->myView->viewport()->pos().x() + org.x, w->myView->v...
                     ^
/Users/xxx/software/opencv/modules/highgui/src/window_QT.h:346:15: note: 
      declared private here
    ViewPort* myView;
              ^
/Users/xxx/software/opencv/modules/highgui/src/window_QT.cpp:976:58: error: 
      reference to non-static member function must be called; did you mean to
      call it with no arguments?
    return cvRect(w->myView->viewport()->pos().x() + org.x, w->myView->v...
                                                     ~~~~^
                                                          ()
/Users/xxx/software/opencv/modules/highgui/src/window_QT.cpp:976:64: error: 
      'myView' is a private member of 'CvWindow'
    return cvRect(w->myView->viewport()->pos().x() + org.x, w->myView->v...
                                                               ^
/Users/xxx/software/opencv/modules/highgui/src/window_QT.h:346:15: note: 
      declared private here
    ViewPort* myView;
              ^
/Users/xxx/software/opencv/modules/highgui/src/window_QT.cpp:976:100: error: 
      reference to non-static member function must be called; did you mean to
      call it with no arguments?
  ...+ org.x, w->myView->viewport()->pos().y() + org.y, w->myView->viewport()...
                                                 ~~~~^
                                                      ()
/Users/xxx/software/opencv/modules/highgui/src/window_QT.cpp:976:106: error: 
      'myView' is a private member of 'CvWindow'
  ...+ org.x, w->myView->viewport()->pos().y() + org.y, w->myView->viewport()...
                                                           ^
/Users/xxx/software/opencv/modules/highgui/src/window_QT.h:346:15: note: 
      declared private here
    ViewPort* myView;
              ^
/Users/xxx/software/opencv/modules/highgui/src/window_QT.cpp:976:138: error: 
      'myView' is a private member of 'CvWindow'
  ...+ org.y, w->myView->viewport()->width(), w->myView->viewport()->height());
                                                 ^
/Users/xxx/software/opencv/modules/highgui/src/window_QT.h:346:15: note: 
      declared private here
    ViewPort* myView;
              ^
/Users/xxx/software/opencv/modules/highgui/src/window_QT.cpp:976:30: error: 
      no member named 'viewport' in 'ViewPort'
    return cvRect(w->myView->viewport()->pos().x() + org.x, w->myView->v...
                  ~~~~~~~~~  ^
/Users/xxx/software/opencv/modules/highgui/src/window_QT.cpp:976:72: error: 
      no member named 'viewport' in 'ViewPort'
    return cvRect(w->myView->viewport()->pos().x() + org.x, w->myView->viewp...
                                                            ~~~~~~~~~  ^
/Users/xxx/software/opencv/modules/highgui/src/window_QT.cpp:976:114: error: 
      no member named 'viewport' in 'ViewPort'
  ...+ org.x, w->myView->viewport()->pos().y() + org.y, w->myView->viewport()...
                                                        ~~~~~~~~~  ^
/Users/xxx/software/opencv/modules/highgui/src/window_QT.cpp:976:146: error: 
      no member named 'viewport' in 'ViewPort'
  ...+ org.y, w->myView->viewport()->width(), w->myView->viewport()->height());
                                              ~~~~~~~~~  ^
12 errors generated.
make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_QT.cpp.o] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [all] Error 2

Configuration

#!/bin/bash

cmake \
 -D CMAKE_BUILD_TYPE=RELEASE \
 -D CMAKE_INSTALL_PREFIX=$HOME/software/opencv-install \
 \
 -D WITH_TBB=ON \
 -D BUILD_NEW_PYTHON_SUPPORT=OFF \
 -D WITH_V4L=OFF \
 -D INSTALL_C_EXAMPLES=OFF \
 -D INSTALL_PYTHON_EXAMPLES=OFF \
 -D BUILD_EXAMPLES=OFF \
 -D BUILD_DOCS=OFF \
 -D WITH_QT=ON \
 -D WITH_OPENGL=OFF \
 -D WITH_CUDA=OFF \
 -D WITH_OPENCL=OFF \
 -D WITH_MATLAB=OFF \
 -D WITH_VTK=ON \
 -DBUILD_TESTS=OFF \
 -DBUILD_PERF_TESTS=OFF \
 \
 -DBUILD_opencv_java=OFF \
 -DBUILD_python_bindings_generator=OFF \
 -DBUILD_opencv_python2=OFF \
 -DBUILD_opencv_python3=OFF \
 -DBUILD_opencv_ml=OFF \
 -DBUILD_opencv_objdetect=OFF \
 -DBUILD_opencv_superres=OFF \
 -DBUILD_opencv_videostab=OFF \
 \
 -DBUILD_opencv_phase_unwrapping=OFF \
 -DBUILD_opencv_plot=OFF \
 -DBUILD_opencv_reg=OFF \
 -DBUILD_opencv_surface_matching=OFF \
 -DBUILD_opencv_xphoto=OFF \
 -DBUILD_opencv_bgsegm=OFF \
 -DBUILD_opencv_face=OFF \
 -DBUILD_opencv_freetype=OFF \
 -DBUILD_opencv_fuzzy=OFF \
 -DBUILD_opencv_img_hash=OFF \
 -DBUILD_opencv_xobjdetect=OFF \
 -DBUILD_opencv_bioinspired=OFF \
 -DBUILD_opencv_dpm=OFF \
 -DBUILD_opencv_line_descriptor=OFF \
 -DBUILD_opencv_saliency=OFF \
 -DBUILD_opencv_text=OFF \
 -DBUILD_opencv_ccalib=OFF \
 -DBUILD_opencv_cvv=OFF \
 -DBUILD_opencv_datasets=OFF \
 -DBUILD_opencv_rgbd=OFF \
 -DBUILD_opencv_structured_light=OFF \
 -DBUILD_opencv_tracking=OFF \
 -DBUILD_opencv_videostab=OFF \
 -DBUILD_opencv_aruco=OFF \
 -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules \
 ../opencv

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions