Follow Us
  • Register
Errorbase is a collaborative writing project, that aims to build the largest trouble-shooting guide about all kinds of error messages.


0 votes

An .obj file exceeded the number of allowable sections, a COFF object file format limitation.

Reaching this section limitation can be the result of using /Gy and a debug build; /Gy causes functions to go into their own COMDAT sections. In a debug build, there is a debug info section for each COMDAT function.

This error can also be caused when there are too many inline functions.

requested by (170k points)
edited by

1 Solution

0 votes

To correct this error, divide your source file into multiple source code files, compile without /Gy, or compile with /bigobj. If you do not compile with /Gy, you will need to specify the optimizations individually, since /O2 and /O1 both imply /Gy.

If possible, compile without debugging information.

You may also need to have specific instantiations of templates in separate source code files, rather than having the compiler emit them.

When porting code, C1128 will likely appear first when using the Itanium (IPF) compiler, and then with the x64 compiler, and much later with the x86 compiler. IPF will have at least 4 sections associated with each function compiled /Gy or inlined from templates or class-inline: code, function descriptor, pdata, and debug info, and possibly xdata. x64 will be the same except for the function descriptor. X86 won’t have the pdata.

solved by (1.6k points)