Unsolved no qt platform could be initialized
-
I followed instructions of one blog, but I don't know if all the dependencies are built statically too. Could you let me know whether the commands below build all the dependencies statically?
- add to qmake
QMAKE_LFLAGS += -static -static-libgcc
QMAKE_CFLAGS_RELEASE -= -O2
QMAKE_CFLAGS_RELEASE += -Os -momit-leaf-frame-pointer
DEFINES += QT_STATIC_BUILD
-
add an environment path
set Path=C:\Qt\Tools\mingw530_32\bin;%PATH% -
Move to Src folder, and command
configure -static -release -platform win32-g++ -prefix C:\Qt\Static\5.10.0 -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -no-openssl -opensource -confirm-license -make libs -nomake tools -nomake examples -nomake tests -
next
mingw32-make -k -j4
mingw32-make -k install -
add to qmake.conf
CONFIG += static
- add to qmake
-
Did you also fully re-build your application with that new Qt build of yours ?
-
If you mean that building my application using newly made kit, then yes.
-
@Aaron-Kim Full rebuild means: delete build directory, run qmake, build
-
@jsulm Do you mean the build directory of my application? or Qt itself?
-
The build folder of your application.
-
@SGaist It seems that I did. Is there any way to show you an error log or something?
-
You can use something like https://pastebin.com
-
@SGaist I mean, how can I get the verbose log of the error to determine what my problem is?
-
@Aaron-Kim
you must create a directory called "platforms". In the next step you copy the qwindows.dll in the platform directory.
You find the dll usually in C:\Qt\Qtx.y.z\x.y.z\mingw73_64\plugins\platforms -
@Mugga
fantastic you saved me! Thanks!!!!!!