Home > Mobile >  QT5 using static compilation environment and generate dynamic library. So the lack of XCB plugin
QT5 using static compilation environment and generate dynamic library. So the lack of XCB plugin

Time:10-13

Recently in the use of QT development dynamic libraries, it integrates some QT5 resources, you need to use the QT5 environment, and the need to static compilation, so as not to transplant or when other environmental deployment to all sorts of problems,

I compiled QT5.3.2 source package, use the way (./configure - release - static - qt - XCB), because before used 4.7.2 version, process or understand, but find using Qtcreator, be born. So file is automatically generated. to a file, I look at the compiled output log and makefile, do a bit of a problem, may be qt5 bugs, () in using 4.7.2 before, there is no problem, very strange!

Then I simply and compiled a Qt non-static version (./configure - Qt - XCB), using Qtcreator in a static compilation environment to generate the correct makefile, and then get compiled statically compiled environment, finally to generate dynamic library. So file, about 16-17 m,

The the library files, in the process of use, will quote this error:
This application failed to start because it could not find the or load the Qt platform plugin "XCB".
Reinstalling the application may fix this problem


This bottom can be difficult to bad I, I see online said lack of libqlinuxfb. So, libqminimal. So, libqoffscreen. So, libqxcb. So the four files, static link in my the four files also not line, LDD also didn't see what the lack of dependent libraries,

Hope great god advice please, thank you!
1, why can't QT5 static compilation environment using Qtcreator generated properly. So the dynamic library file?
2, how to solve the problem of dynamic libraries to the lack of XCB plugin?

CodePudding user response:

Your problem solved, I also found the situation, when released what libraries are added, also added the plugins

CodePudding user response:

The building Lord, I want to ask, I compiled using qt source XCB library,
./configure -- qt XCB error, would like to know how do you solve?
Error message:
 
Creating qmake...
Gmake: Nothing to be done for 'first'.
Running configuration tests...
The test for linking against libxcb failed!
You took the need to install the dependency packages for libxcb.
See the SRC/plugins/platforms/XCB/README.

CodePudding user response:

Try setting the export QT_QPA_PLATFORM=XCB, why don't you see.
  •  Tags:  
  • Qt
  • Related