Created On:  03 December 2012

Problem:

When building a Visual COBOL project the following error is produced:

LINK : fatal error LNK1248: image size (D3B7A000) exceeds maximum allowable size (80000000)

Resolution:

This is a limit of Windows not the compiler.   The Microsoft linker has determined that the size of the output file will exceed the largest possible size for a program image.   The largest possible size for a program image is 2 GB.

The solution is to reduce the size of the program image,  for example this large array would cause the error, reducing the size of the occurs would resolve the problem.

01  library            identified by "library".
         05  book             identified by "book"
                                occurs 1999999 times
                                count in library-book-count.
             10  book-title  pic x(40) identified by "title".
             10  book-author pic x(40) identified by "author".
             10  book-toc              identified by "toc".
                 15  book-toc-section occurs 20 times
                                   count in book-section-count
                                   identified by "section"
                                   pic x(40).
Incident #2603644