Microsoft KB Archive/235956

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 16:07, 18 July 2020 by 3155ffGd (talk | contribs) (importing KB archive)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Base

DOC: /OPT:NOWIN98 Linker Option Not Described in Linker Reference

Article ID: 235956

Article Last Modified on 11/18/2003


  • Microsoft Visual C++ 6.0 Enterprise Edition
  • Microsoft Visual C++ 6.0 Professional Edition
  • Microsoft Visual C++ 6.0 Standard Edition

This article was previously published under Q235956


Microsoft Visual C++ 6.0 introduces two new linker optimization options -- /OPT:WIN98, which is set by default, and /OPT:NOWIN98. The default sets the file alignment at 4K instead of the previous 512 bytes. This results in a larger module size, but one which loads faster on Windows 98 with reduced file swapping. A release build of an AppWizard-generated MDI application is approximately 14K larger than when the /OPT:NOWIN98 option is used, and a ReleaseMinSize build of a standard ATL DLL with no objects added is approximately 17K larger.


The default WIN98 optimization for file alignment places the base of sections in the portable executable image on Windows 98's page boundary, resulting in decreased load times and reduced need for file swapping. The percentage increase in module size is less for larger applications, and the benefits normally justify the increase in size. However, if module size is a critical factor, /OPT:NOWIN98 can be used to revert to the original 512-byte alignment.

NOTE: The /ALIGN:512 option also has this effect, but will produce linker warning 4108, as this option is normally reserved for drivers.

The Visual C++ ReadMe file (READMEVC.htm) has further information on these linker options.

Keywords: kbdocfix KB235956