NO

Author Topic: __chkstk  (Read 7059 times)

post from old forum

  • Guest
__chkstk
« on: September 13, 2004, 09:27:08 PM »
As my application doesn't use any C runtime functions at all, I was trying to ditch it completely. However when I select not to use the standard library I get an error about __chkstk being undefined.
What is __chkstk and is it replaceable so I don't have to link with the C runtime?

shelded

post from old forum

  • Guest
__chkstk
« Reply #1 on: September 13, 2004, 09:27:37 PM »
From compuware:
http://frontline.compuware.com/nashua/kb/doc/525.asp
Unresolved error _chkstk

FAQID525 1999-07-13
Q: I get an unresolved error _chkstk when trying to build my vxd. Make it go away.

A: The problem will also likely occur if there is a function in any of the modules that declares a very large array as a local variable. You'll have
to remove the array, or make it static, or come from the heap.

Also, make sure that you have neither the /GZ, nor the /Gs switches on your compile line.

Timppa

post from old forum

  • Guest
__chkstk
« Reply #2 on: September 13, 2004, 09:28:05 PM »
Just to clearify: if you have more than ~4 kB of local variables, a call to ___chkstk will always be inserted. It is used to possibly grow the current stack, up to the maximum stack limit (otherwise you will get an exception). This is releated to the linker option /STACK.

Pelle