Skip to content

highgui: Fix unresolved OpenGL functions for Qt backend #21347

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 26, 2021

Conversation

StefanBruens
Copy link
Contributor

@StefanBruens StefanBruens commented Dec 26, 2021

The Qt backend directly calls some OpenGL functions (glClear, glHint,
glViewport), but since OCV 4.5.5 the GL libraries are no longer part
of the global extra dependencies. When linking with "-Wl,--no-undefined"
this causes linker errors:

opencv-4.5.5/modules/highgui/src/window_QT.cpp:3307: undefined reference to glClear'`

Fixes: #21346
Related issues: #21299

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake
force_builders=Custom
build_image:Custom=qt:16.04
buildworker:Custom=linux-1,linux-4,linux-6

The Qt backend directly calls some OpenGL functions (glClear, glHint,
glViewport), but since OCV 4.5.5 the GL libraries are no longer part
of the global extra dependencies. When linking with "-Wl,--no-undefined"
this causes linker errors:

`opencv-4.5.5/modules/highgui/src/window_QT.cpp:3307: undefined reference to `glClear'`

Fixes: opencv#21346
Related issues: opencv#21299
@alalek
Copy link
Member

alalek commented Dec 26, 2021

@StefanBruens Thank you! Problem is reproduced here: #21349 (Qt build)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport is needed Label for maintainers. Authors of PR can ignore this bug category: build/install category: highgui-gui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

highgui: Underlinking of Qt backend with ENABLE_OPENGL=ON
3 participants