Page 1 of 1
What is ChkStk - unpresolved external symbol error
Posted: Thu May 17, 2007 8:25 pm
by localmotion34
What is ___chkstk? i am linking to a static lib, and polink screams at me about unresolved external symbols.
i am compiling the lib in pellesc as a single threaded lib with windows and pellesc extensions enabled.
why does polink almost always scream about unresolved external symbols?
Posted: Thu May 17, 2007 8:48 pm
by srod
My guess would have been that you need to link in one of the c runtime libraries with your application, but the following suggests otherwise:
http://blog.mypapit.net/2006/05/solutio ... hkstk.html
Posted: Thu May 17, 2007 8:53 pm
by localmotion34
i figured it out just now. i had to link with pelles c CRT.LIB. thats where that function resides.
the static lib now works beautifully. i can now use huffman, rice, shannon-fano, RLE, and LZW compression schemes.
Posted: Thu May 17, 2007 8:56 pm
by srod
Ah, as I initially thought! First thing to check with Pelles!
Are you working with ZLIB by any chance?
Posted: Thu May 17, 2007 9:01 pm
by localmotion34
yes. i am working with ZLIB, and this really cool set of compression routines in plain ANSI C. i compiled them with Pelles and imported them to use their compression in my new image format.
they all kind of suck at compressing image data, especially real world pictures of real things, and not simple drawings and artwork.
know any pb importable static compression libs to use instead?
Posted: Thu May 17, 2007 9:06 pm
by srod
Afraid not. I just recognised the schemes you mentioned as being those essentially behind zip compression. Not sure you'll really find any better, at least not based on the construction of 'dictionaries' etc.
Posted: Sat May 09, 2009 4:51 pm
by Rings
i run also in a this polink error .
There is a nice very fast C code for compressing.
I set a peles-c project for that and wrote a small
purebasic-code.
i bundled everythiing in a zip file
download at:
http://www.turboupload.com/08iye6anghdb ... b.zip.html
use the button with "Kostenloser Download"
can someone help ?
Posted: Sun May 10, 2009 11:14 am
by Rings
thx ts-soft for the answer:
Code: Select all
!extrn __chkstk
!public __chkstk as "___chkstk"
Re: What is ChkStk - unpresolved external symbol error
Posted: Fri Oct 09, 2015 2:16 pm
by coder14
Sorry for bumping old topic. I get the same problem when static linking to static library compiled with Code::Blocks. The error messages is
Polink error: unresolved external symbol '__chkstk_ms'
Polink error: unresolved external symbol '_stat'
Anyone can help?

Re: What is ChkStk - unpresolved external symbol error
Posted: Sat Oct 10, 2015 9:54 am
by TI-994A
coder14 wrote:Polink error: unresolved external symbol '__chkstk_ms'
Polink error: unresolved external symbol '_stat'
Not quite familiar with those. Seems like some missing library.
Re: What is ChkStk - unpresolved external symbol error
Posted: Thu Oct 15, 2015 4:53 am
by coder14
I have been trying to resolve this but no success.
Anyone could help please?
Re: What is ChkStk - unpresolved external symbol error
Posted: Thu Oct 15, 2015 2:06 pm
by chi
You could try to
update MinGW (Although it says: This Guide is Old and will no longer work, maybe there are some hints for you).
Or maybe switch to Visual Studio Community 2015
