Why does the size of the file grow so much with each release without changing the code?
-
@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 ? -
Then its a bit odd as a clean build should be same size unless you add something new.
-
@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
-
@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
-
@ChrisW67
Thank you for your explanation. It should be related to the compiler. But something more strange happened. I uninstalled and reinstalled QT, and now I can't start it 😂 -
@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