QT6 run the .exe but point out "lack of libwinpthread-1.dll"
-
I have compile Qt6.5.3 Src file by Mingw and built a static link version QT.
my configuration is :
configure.bat -static -prefix "C:\Qt\6.5.3\mingw_64_static" -releaseand then I use the "mingw_64_static" to compile a program, got a “.exe” file. I attemped to run the .exe on another computer on win11.
but it fails,system point out that “libwinpthread-1.dll” is missing.
why? and how to solve it?Thank you -
Hi,
You did not use the
-static-runtime
option when calling configure. -
@pedisChen said in QT6 run the .exe but point out "lack of libwinpthread-1.dll":
but why?
Because without -static-runtime runtime libs like pthread will not be built as static libs, instead they will be linked as shared libs.
-
Have a look at this https://forum.qt.io/topic/156422/trying-to-build-a-static-qt-for-windows
There @mzimmers tried to do exactly the same thing build a static Qt 6.5.3 with MinGW.
-