Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

linker problem with DOS program

0 views
Skip to first unread message

Valued PowerSpec Customer

unread,
Feb 19, 1997, 3:00:00 AM2/19/97
to

I'm trying to build a DOS programs with Visual C++ 1.52 and I get this
error

LINK : fatal error L2041: stack plus data exceed 64K

I have tried using the online help but it doesn't make much sense to me.
(I've tried using the /Gt option to no avail)

Does anyone know how to fix this?

Thanks

Jim Marshall

unread,
Feb 19, 1997, 3:00:00 AM2/19/97
to

VC++ is optimized to make Windows applications, as such it tries to put
as much data into the near heap. So you need to turn this off. Go to
the Options|Project menu, press the compiler button and choose MEMORY.
(I assume your in large memory model), check the box that says "Assume
extern and uninitialized data far". This is what you want for DOS apps.
If you continue to get the error, try setting the /Gt option to 3 (in
the same area put a 3 in the edit box labeled "new data size threshold")
--
Talk is cheap & lies are expensive....
My wallets fat & so is my head.

Valued PowerSpec Customer

unread,
Feb 20, 1997, 3:00:00 AM2/20/97
to

Thanks Jim,

The /Gt3 setting solved the problem. Since the default was around 32000 and
the range was from 0 to around 65000, the lower numbers I tried were still
in the thousands, as low as 16000 but never as low as 3.


0 new messages