/bigobj (Increase Number of Sections in .Obj file)
/bigobj increases the number of sections that an object file can contain.
By default, an object file can hold up to 65,536 (2^16) addressable sections. This is the case no matter which target platform is specified. /bigobj increases that address capacity to 4,294,967,296 (2^32).
Most modules will never generate an .obj file that contains more than 65,536 sections. However, machine generated code, or code that makes heavy use of template libraries may require .obj files that can hold more sections. /bigobj is enabled by default on Universal Windows Platform (UWP) projects because the machine-generated XAML code includes a large number of headers. If you disable this option on a UWP app project you are likely to encounter compiler error C1128.
Linkers that shipped prior to Visual C++ 2005 cannot read .obj files that were produced with /bigobj.
To set this compiler option in the Visual Studio development environment
Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.
Click the C/C++ folder.
Click the Command Line property page.
Type the compiler option in the Additional Options box.
To set this compiler option programmatically
- See AdditionalOptions.
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.