Why does the size of the file grow so much with each release without changing the code?
-
Why does the size of the EXE file grow so much with each release without changing the code? The first time it was 3M, the second time it was 7M, the third time it was 10M, and the fourth time it was 100M. This is true even after a delete is rebuilt
-
Hi,
There's information missing here.
Which Qt versions ?
Which OSs ?
Which compilers ?
Which architectures ?
Which system targets ?
What is their architectures ?
Are you using resources ?
If so, what did you put it there ?
What did you change in your code ?
What did you change between the different builds ?
Etc. -
@SGaist
This was not the case before, now Debug and Release both have the same problem, there is no change in the code, the size increases a lot each time it runs. Qt version 5.15.2, Windows10 system, compiler mingw8.1.0 64 bit, do not understand what architecture refers to? -
Can you show your .pro file ?
The processor architecture you are targeting x86, x86_64, arm, arm64 etc. So in your case Windows 64bit. -
Do you have the same behavior if you build a default application ?
-
@duncan98 I am certain it has nothing to do with Qt Creator. Starting Qt Creator will not change an executable. Creator is not a C++ compiler; it is an editor that can launch a make process to build your executable for you. The compiler and linker are what produce the executable. In your case, this a GCC version. Producing the executable is not connected to running the executable.
The ways a Windows executable file can grow is:
- You put more code, or embedded resources, in it.
- You build a version with debug symbols, which will be a bit larger (but not usually an order of magnitude)
- You build a version with different compiler optimisation options.
- You change the compiler; different compilers will produce different sized results.
- Some external process, that is neither the compiler nor the running executable, opens the file and appends to the executable.
If you want to support your claimed behaviour with some evidence:
- Delete your build folder
- Verify that your target executable (wms.exe) does not exist.
- Build your application
- Post the entire content of the Qt Creator compiler output panel (copy and paste the text not a partial screen shot)
- Execute "dir wms.exe" in the build folder and post the result
- Delete the executable
- Build your application
- Post the entire content of the Qt Creator compiler output panel (copy and paste the text not a partial screen shot). Note that this should not include calls to compile C++ source, only a linker call.
- Execute "dir wms.exe" in the build folder and post the result