Static exe still requires a few dlls.
-
Hello!
I'm using Qt 5.9.1 msvc2015_static. I was build this version from sources using theese commands:
configure.bat -prefix D:\Code\qt\Qt\5.9.1\msvc2015_static\ -platform win32-msvc2015 -recheck-all -commercial -confirm-license -debug-and-release -opengl desktop -no-angle -mp -static -no-shared -qt-zlib -qt-libjpeg -qt-libpng -qt-xcb -qt-freetype -qt-pcre -qt-harfbuzz -nomake examples -openssl-linked -I D:\Code\openssl\vc-win32\include -L D:\Code\openssl\vc-win32\lib -I D:\Code\qt\icu\include -L D:\Code\qt\icu\lib -I D:\Code\qt\angle\include -I D:\Code\qt\libevent-2.1.8-stable -L D:\Code\qt\libevent-2.1.8-stable -I D:\Code\qt\angle\src OPENSSL_LIBS="libeay32.lib ssleay32.lib gdi32.lib"nmake nmake installNow i sucsesfully build a Qt application using msvc2015_static. But the application still requires theese dlls:
api-ms-win-downlevel-ole32-l1-1-0.dll api-ms-win-downlevel-user32-l1-1-0.dll api-ms-win-downlevel-version-l1-1-0.dllI'm using libs to build code (if I remove any linker retunrs "unresolved external symbol"):
qtmain.lib Qt5Core.lib Qt5Gui.lib Qt5Network.lib Qt5Widgets.lib Qt5PlatformCompositorSupport.lib Qt5FontDatabaseSupport.lib Qt5EventDispatcherSupport.lib Qt5ThemeSupport.lib Qt5AccessibilitySupport.lib ssleay32.lib libeay32.lib advapi32.lib crypt32.lib gdi32.lib iphlpapi.lib mincore_downlevel.lib qtharfbuzz.lib qtlibpng.lib qtpcre2.lib qwindows.lib shell32.lib UxTheme.lib Version.lib winmm.lib Ws2_32.lib qtfreetype.lib imm32.lib dwmapi.lib LIBCPMT.LIB libcmt.lib libvcruntime.lib libucrt.lib uuid.lib kernel32.lib user32.lib oleaut32.lib ole32.lib comsupp.lib qico.lib qjpeg.libAre there an solution to build my application fully statical without any dll's requirments?
Thanks.
-
-
Downlevel means I'm using minimal version of MS SDK which works on windows 7 and 8. I'm using windows 10 for build.
-
Hi and welcome to devnet,
You would need to re-built Qt to link against the static VS runtime.
-
Hi and welcome to devnet,
You would need to re-built Qt to link against the static VS runtime.
@SGaist Are there any options to configure static msvc linking into qt libs?
My \Src\qtbase\mkspecs\common\msvc-desktop.conf contains theese strings:
QMAKE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_OPTIMIZE -MT QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -MT -Zi QMAKE_CFLAGS_DEBUG = -Zi -MTdThank you.
-
You have to modify the mkspec to use MT, so it looks like it has already been done.
Did you also re-compiled all dependencies to be static ?
-
You have to modify the mkspec to use MT, so it looks like it has already been done.
Did you also re-compiled all dependencies to be static ?
@SGaist
I think yes, I did. I'll check all dependencies again.