PRB: L2061 Error on _TEXT Segment in Large Memory Model App

ID: Q133072

The information in this article applies to:

SYMPTOMS

When building a large application with the large or huge memory model, the Visual 16-bit C++ linker reports an L2061 error and displays this message:

   no space for data block associated with <function> inside segment _TEXT

Here <function> is the (possibly decorated) name of a C/C++ run-time function.

CAUSE

This can occur when building very large applications that call a large number of run-time library functions. The run-time library puts all its code in the _TEXT segment. If an application pulls in a lot of code from the run-time library, because of calling many functions, the size of _TEXT will exceed 64K, which is the maximum size of a segment.

This can also occur in large mixed-language programs using Visual C++ and Microsoft Fortran. The Fortran run-time functions are also placed in _TEXT.

RESOLUTION

To resolve this behavior, do one of the following:

STATUS

This behavior is by design.

Additional query words: 5.5 5.6 5.50 5.60 5.60.339

Keywords          : kb16bitonly kbCRT kbVC LinkIss 
Version           : 1.0 1.5 1.51 1.52
Platform          : WINDOWS
Issue type        : kbprb

Last Reviewed: August 11, 1997