0

I have a question about programming in QT under Linux 16.04LTS and CUDA. I am trying to develop an OpenGL application and I'm struggling when I'm trying to build app. It gives me this error:

This application failed to start because it could not find or load the

Qt platform plugin "xcb" in "".

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl, xcb.

Reinstalling the application may fix this problem. can't find linker symbol for virtual table for 'MainWindow' value

I've already checked other suggestions from previous post but this is slightly different. As I figured out this error is caused by Opengl GLU libraries.

LIBS += -L/usr/lib/x86_64-linux-gnu \
-lGLU \
-lglut \
-lGL

Every time when I include it to .pro file I got this problem. Without GLU libraries it is working but I can't use gluPerspective or gluLookAt.

However, the strange issue is happening when I built application without GLU libraries after building it with GLU libraries. So basically I build app with GLU and then without. Then I can run app but after rebuilding it (using clean or rebuilt option) I got error of missing GLU libraries.

Also I've already included QTOpenGl to .pro file.

QT       += opengl

Do you have any suggestions about this issue? Can I use different libraries then GLU libraries to avoid this situation?

EDIT: Problem solved. Linux is installing default qt libraries which is causing collision. It seems GL libraries was linked to default libraries.

Andy
  • 61
  • 1
  • 6
  • Does [this](https://stackoverflow.com/questions/17106315/failed-to-load-platform-plugin-xcb-while-launching-qt5-app-on-linux-without) solve your problem? Or maybe [this](https://askubuntu.com/questions/308128/failed-to-load-platform-plugin-xcb-while-launching-qt5-app-on-linux-without)? – BDL Apr 19 '18 at 10:25
  • No, those answers are referencing to missing plugin or missing linkage to plugins. I can run app but only without GLU libraries. This happened suddenly, probably caused by update of QT which I believe so because I could work for months with QT and GLU without error. – Andy Apr 19 '18 at 10:28
  • Additionally, when this issue happened I reinstall Linux completely with the same result. – Andy Apr 19 '18 at 10:40
  • 1
    Do you actually _need_ the GLU library? GLU is stuck in the past century and shouldn't be used with modern OpenGL anyway. If it's just gluPerspective and gluLookAt you need, why not simple reimplement them in your program? – datenwolf Apr 20 '18 at 06:44
  • See what actual invocations of the compiler and linker look like. Run them manually. Use `objdump` and `nm` to understand what's wrong with that linking step. – Velkan Apr 20 '18 at 12:17

0 Answers0