I compiled Qt 5.13.2 on Linux with the following line:
/home/Qt/5.13.2/Src/configure -release -static -ltcg -optimize-size -opensource -confirm-license -platform linux-g++ -no-pch -nomake tools -nomake tests -nomake examples -skip webengine -prefix "/home/Qt/513-static"
Then I created a new kit in QtCreator to use this compilation. After compiling, I tried to run but I get the error
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: wayland-egl, wayland.
My application works fine with dynamic linkage. Should I change something in the.pro file to make it work with static library?
I tried to look into the official documentation, but the information is quite poor about this.
The problem was with the compilation. I compiled using the following line and it worked:
configure -release -static -optimize-size -opensource -confirm-license -feature-freetype -fontconfig -c++std c++2a -no-pch -nomake tools -nomake tests -nomake examples -skip webengine -recheck-all -platform linux-g++ -ltcg -xcb -prefix "/home/vinicius/Qt/Qt-static"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.