ID Number: Q50130
3.65 3.69 4.x 5.x | 5.x
MS-DOS | OS/2
Summary:
SYMPTOMS
The following error indicates that there is more than 64K of stack
and data to be put into the 64K DGROUP (default data segment):
L2041 stack plus data exceeds 64K
The combined size of the program stack segment plus DGROUP was
greater than 64K; as a result, the program will not load up
correctly.
RESOLUTION
To correct this problem, do the following:
1. If the file(s) was compiled with C 5.0, a large amount of string
literal data in the program may cause this error. Unlike C 5.1,
C 5.0 cannot move string literals out of DGROUP with the /Gt
option. This problem can be corrected with the "C 5.0 /Gt Fix"
application note, which is available from Microsoft Product
Support Services by calling (206) 454-2030.
2. Reduce the stack size.
3. Use a large data model (compact, large, or huge). Try applying
the /Gt compilation option to lower the threshold.
4. Use the FAR keyword to move data out of DGROUP.
More Information:
This error is documented in "Linker Error Messages" in the "Microsoft
QuickC Compiler for IBM Personal Computers and Compatibles
Programmer's Guide," Section D.4, page 374. It is also in the file
ERRMSG.DOC on Compiler disk 1 for Microsoft C version 5.1, on the
Setup disk for Microsoft C version 5.0, in the file README.DOC on disk
1 for Microsoft Macro Assembler version 5.1, in the file CVREADME.DOC
on the CodeView for MS-DOS disk for Microsoft FORTRAN version 4.1, and
in the online help for C version 6.0 and MASM version 6.0. It is not
found in the "CodeView and Utilities, Microsoft Editor, Mixed-Language
Programming Guide" manual.
Nonfatal errors indicate problems in the executable file. LINK
produces the executable file. Nonfatal error messages have the
following format:
location : error L2xxx: messagetext
In these messages, location is the input file associated with the
error, or LINK if there is no input file. If the input file is an .OBJ
or .LIB file and has a module name, the module name is enclosed in
parentheses.
Additional reference words: appnote 3.65 3.69 4.06 4.07 4.10 5.01.20
5.01.21 5.02 5.03 5.05 5.10 5.11 5.13 5.15