[Title] [original] reduces the size of the exe file generated by VC6 Compilation
[Date] 2012-01-12
【Abstract】 reduce the exe size.
[Keywords] size, VC6, compression, shelling
[Environment] Visual Studio 6
Author wintys (wintys@gmail.com) http://wintys.cnblogs.com
URL http://www.cnblogs.com/wintys/archive/2013/05/09/cpp_reduce_exe_file_size.html
[Content ]:
1. The most effective way to reduce the size of the exe file generated by VC6 compilation is:
Steps:
1. Use the release version
2. Add: # pragma comment (linker, "/OPT: nowin98") to the code ")
3. project --> setting --> c/c ++ --> link-> check Ignore all default libraries
4. project --> setting --> c/c ++ --> link-> object/library modules: add several lib files,
(For example, add msvcrt. lib to the void main () {}or WinMain () Program). Different programs need different lib files,
It must be added to project --> setting --> c/c ++ --> link-> object/library modules,
# Parama comment (lib, "*. lib). As for what lib files are needed, check the error message,
Find msdn and easily find the required lib.
5. Use UPX compression: http://upx.sourceforge.net