Linux application failed to run with error: qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "plugins/platforms/"
-
Hi all,
I have built QT 5.14.1 on linux with -qt-xcb flag in configure and when I try to run my application with these QT libs and plugins, I get following error:*****qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "plugins/platforms/"
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.Available platform plugins are: eglfs (from plugins/platforms/), linuxfb (from plugins/platforms/), minimal (from plugins/platforms/), minimalegl (from plugins/platforms/), offscreen (from plugins/platforms/), vnc (from plugins/platforms/), webgl (from plugins/platforms/), xcb (from plugins/platforms/), eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl, xcb.**
I have set QT_QPA_PLATFORM_PLUGIN_PATH=plugins/platforms/ and placed this folder where my program is. Also I tried setting QT_DEBUG_PLUGINS=1 and ran, but could not find any error, except at the end which gives error as mentioned above.
Also I ran ldd for exe, qxcb plugin so, and related so and all dependent libs were present in output.Strange thing is earlier I had built QT 5.13.2 with exact same configuration and same procedure to run the application and I did not get any error.
Please suggest if you have any other thing that can be tried out here. Or is there any issue with my build that you suspect?
Thanks in advance.
Sheetal -
@Sheetal-Deshpande said in Linux application failed to run with error: qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "plugins/platforms/":
Hi all,
I have built QT 5.14.1 on linux with -qt-xcb flag in configure and when I try to run my application with these QT libs and plugins, I get following error:*****qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "plugins/platforms/"
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.Available platform plugins are: eglfs (from plugins/platforms/), linuxfb (from plugins/platforms/), minimal (from plugins/platforms/), minimalegl (from plugins/platforms/), offscreen (from plugins/platforms/), vnc (from plugins/platforms/), webgl (from plugins/platforms/), xcb (from plugins/platforms/), eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl, xcb.**
I have set QT_QPA_PLATFORM_PLUGIN_PATH=plugins/platforms/ and placed this folder where my program is. Also I tried setting QT_DEBUG_PLUGINS=1 and ran, but could not find any error, except at the end which gives error as mentioned above.
Also I ran ldd for exe, qxcb plugin so, and related so and all dependent libs were present in output.Strange thing is earlier I had built QT 5.13.2 with exact same configuration and same procedure to run the application and I did not get any error.
Please suggest if you have any other thing that can be tried out here. Or is there any issue with my build that you suspect?
Thanks in advance.
SheetalUpdate: Issue is resolved. I was adding one windows specific flag in main.cpp for creating qapplication, which was triggering windows plugin look up. So I removed it for linux code and its not giving that error.