Unsolved 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. -
@SGaist
The processor is x86_64.
Resources are added through the resource editor. No project configuration parameters have been modified, just re-run. -
Do you have the same behavior if you build a default application ?
-
This post is deleted! -
This problem is not solved, and occasionally occurs for no reason. The size of EXE file increases with the number of times creator is started
-
Is this a bug?
-
@duncan98
Hi
I dont think so.
If you delete teh build folder and rebuild all. then what size has it ? -
@mrjj
After I delete the build folder, clean up the project and rebuild, the size is increased compared to the previous one. The Qt version is 5.15.2 -
@duncan98
so you clean the folder and rebuild
If you do it again, this time the exe size is bigger ? -
@mrjj
yes -
@duncan98
and you go and delete the exe ?
not just use the menu clean build folder ? -
@mrjj
yes -
Then its a bit odd as a clean build should be same size unless you add something new.
-
@mrjj
The normal EXE file is only 2M, and the abnormal one is 100M -
This post is deleted! -
I think it may be the creator's problem
-
@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