PRB: Linker Error L2041: "Stack Plus Data Exceeds 64K" (50130)
The information in this article applies to:
- Microsoft LINK for MS-DOS 3.65
- Microsoft LINK for MS-DOS 3.69
- Microsoft LINK for MS-DOS 4.x
- Microsoft LINK for MS-DOS 5.0x
- Microsoft LINK for MS-DOS 5.1x
- Microsoft LINK for MS-DOS 5.2x
- Microsoft LINK for MS-DOS 5.3x
- Microsoft LINK for MS-DOS 5.5
- Microsoft LINK for MS-DOS 5.6
- Microsoft LINK for OS/2 5.0x
- Microsoft LINK for OS/2 5.1
- Microsoft LINK for OS/2 5.11
- Microsoft LINK for OS/2 5.13
- Microsoft LINK for OS/2 5.15
This article was previously published under Q50130 SYMPTOMS
An attempt to link an application fails and Microsoft LINK
generates the following message:
L2041 stack plus data exceeds 64K
CAUSE
The application has more than 64K of stack and data to put into
DGROUP (the default data segment).
RESOLUTION
To address this situation, perform one or more of the following
three steps:
- Reduce the stack size for the application.
- Compile the application in the compact, large, or huge memory
model.
- Use the /Gt compiler option switch or the FAR keyword to remove
data from DGROUP and place it into another data segment.
REFERENCES
For more information on error L2041, see one of the following
references:
- "Linker Error Messages" (section D.4, page 374) in the "Microsoft
QuickC Compiler for IBM Personal Computers and Compatibles
Programmer's Guide"
- The ERRMSG.DOC file on Compiler disk 1 for Microsoft C version 5.1
and on the Setup disk for Microsoft C version 5.0
- The README.DOC file on disk 1 for Microsoft Macro Assembler (MASM)
version 5.1
- The CVREADME.DOC file on the CodeView for MS-DOS disk for Microsoft
FORTRAN version 4.1
- The online help for Microsoft C version 6.0, MASM version 6.0,
and Visual C++ for Windows versions 1.0 and 1.5
- The "Comprehensive Index and Errors Reference" for Microsoft C/C++
version 7.0, page 503
Modification Type: | Minor | Last Reviewed: | 8/31/2005 |
---|
Keywords: | kb16bitonly kberrmsg KB50130 |
---|
|