I'm working on a very old DOS program on Borland C++ 4.51.
The memory model is LARGE.
The platform is DOS (16-bit DPMI).
Recently, I got a linker error:
"Automatic data segment exceeds 64K"
The problem only occurs in the debug version of my program. The
release version is fine.
After some research, I understand the nature of the problem and have
seen many solutions offered. Things like changing compilers, memory
models, or target platforms are not options for me because the program
is large and becomes horribly broken when I do these things.
After getting no results by placing large amounts of data in the
program into far segments, I decided to try a ridiculous experiment.
I removed all data from the program. I still get the error.
It's almost as though breaching the 64K threshold flips a switch
somewhere in my compiler that I cannot unflip no matter how much data
I remove from the program.
Someone offered the following solution - "don't compile in debug
information to all modules of the program." I went one better. I
turned off the compile in debug information for the entire program. I
still get the error.
I know I'm not breaching the limit at this point. It seems like I
just can't wake the compiler up to this fact now.
Anyone had this problem?