Problems encountered when I use vs2022+qt6 static compilation
-
@Christian-Ehrlicher I successfully built QT using -static -static runtime, and vs2022 successfully generated a simple exe, but this exe cannot run normally on win7 x64,
QtWidgetsApplication1. exe - System Error
The program can't start because api-ms-win-shcore-scaling-l1-1-1. dll is missing from your computer. Try reinstalling the program to fix this problem.
OK
How can I further solve this problem? I hope my exe can run without any explicit DLL.
thanks u
@injertao said in Problems encountered when I use vs2022+qt6 static compilation:
I successfully built QT using -static -static runtime, and vs2022 successfully generated a simple exe, but this exe cannot run normally on win7 x64
Please note Qt 6 only supports Windows 10.
-
@injertao
Yeah, that really should be plenty :) Re-verify you still have that much space left. It's possible that error message is "misleading". Can you manage to copy the file in question from/to the exact paths in the message? Is there some issue creating the destination path? -
@injertao said in Problems encountered when I use vs2022+qt6 static compilation:
SET CONFIGURE_OPTIONS=-debug-and-release -mp -opensource -confirm-license -static -static-runtime -optimize-size
[...]
@hskoglund I'm stupid, but my C drive has 100GB, isn't that enough?Well, you're asking for a static debug build + static release build of all of Qt. If you combine static with debug, executable sizes add up quite fast :)
Do you really need the debug build?
-
@injertao said in Problems encountered when I use vs2022+qt6 static compilation:
I successfully built QT using -static -static runtime, and vs2022 successfully generated a simple exe, but this exe cannot run normally on win7 x64
Please note Qt 6 only supports Windows 10.
-
@injertao said in Problems encountered when I use vs2022+qt6 static compilation:
What is the last version to support Windows 7 x64?
Qt 5.15
have 100GB on my hard drive
Check your file system. Is there enough space left?
-
@injertao said in Problems encountered when I use vs2022+qt6 static compilation:
SET CONFIGURE_OPTIONS=-debug-and-release -mp -opensource -confirm-license -static -static-runtime -optimize-size
[...]
@hskoglund I'm stupid, but my C drive has 100GB, isn't that enough?Well, you're asking for a static debug build + static release build of all of Qt. If you combine static with debug, executable sizes add up quite fast :)
Do you really need the debug build?
-
Note that Qt6 applications, even compiled statically, won't run on Windows 7.
If you really want to achieve this, you need to patch Qt6, see details at https://forum.qt.io/topic/133002/qt-creator-6-0-1-and-qt-6-2-2-running-on-windows-7
If you run out of disk space, you can set the NTFS compression flag of your build directory.
-
Hi, iperhaps iit is because your host OS has no space left (even thougjh your C: drive inside VMWare is ok)
This can happen when you tell VMWare to dynamically allocate space for the C: drive (i.e. not a fixed size C:)@hskoglund
I confirm that the disk capacity of the host is sufficientthanks
-
Note that Qt6 applications, even compiled statically, won't run on Windows 7.
If you really want to achieve this, you need to patch Qt6, see details at https://forum.qt.io/topic/133002/qt-creator-6-0-1-and-qt-6-2-2-running-on-windows-7
If you run out of disk space, you can set the NTFS compression flag of your build directory.
@cristian-adam
Thank you, I will make further Chan