[Original] reduce the size of the exe file generated by VC6 Compilation

Source: Internet
Author: User
[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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.