What is ChkStk - unpresolved external symbol error

Just starting out? Need help? Post your questions and find answers here.
localmotion34
Enthusiast
Enthusiast
Posts: 665
Joined: Fri Sep 12, 2003 10:40 pm
Location: Tallahassee, Florida

What is ChkStk - unpresolved external symbol error

Post 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?

Code: Select all

!.WHILE status != dwPassedOut
! Invoke AllocateDrink, dwBeerAmount
!MOV Mug, Beer
!Invoke Drink, Mug, dwBeerAmount
!.endw
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post 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
I may look like a mule, but I'm not a complete ass.
localmotion34
Enthusiast
Enthusiast
Posts: 665
Joined: Fri Sep 12, 2003 10:40 pm
Location: Tallahassee, Florida

Post 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.

Code: Select all

!.WHILE status != dwPassedOut
! Invoke AllocateDrink, dwBeerAmount
!MOV Mug, Beer
!Invoke Drink, Mug, dwBeerAmount
!.endw
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Ah, as I initially thought! First thing to check with Pelles! :)

Are you working with ZLIB by any chance?
I may look like a mule, but I'm not a complete ass.
localmotion34
Enthusiast
Enthusiast
Posts: 665
Joined: Fri Sep 12, 2003 10:40 pm
Location: Tallahassee, Florida

Post 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?

Code: Select all

!.WHILE status != dwPassedOut
! Invoke AllocateDrink, dwBeerAmount
!MOV Mug, Beer
!Invoke Drink, Mug, dwBeerAmount
!.endw
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post 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.
I may look like a mule, but I'm not a complete ass.
User avatar
Rings
Moderator
Moderator
Posts: 1427
Joined: Sat Apr 26, 2003 1:11 am

Post 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 ?
SPAMINATOR NR.1
User avatar
Rings
Moderator
Moderator
Posts: 1427
Joined: Sat Apr 26, 2003 1:11 am

Post by Rings »

thx ts-soft for the answer:

Code: Select all

!extrn __chkstk
!public __chkstk as "___chkstk"
SPAMINATOR NR.1
coder14
Enthusiast
Enthusiast
Posts: 327
Joined: Tue Jun 21, 2011 10:39 am

Re: What is ChkStk - unpresolved external symbol error

Post 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? :(
User avatar
TI-994A
Addict
Addict
Posts: 2512
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: What is ChkStk - unpresolved external symbol error

Post 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.
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
coder14
Enthusiast
Enthusiast
Posts: 327
Joined: Tue Jun 21, 2011 10:39 am

Re: What is ChkStk - unpresolved external symbol error

Post by coder14 »

I have been trying to resolve this but no success. :(

Anyone could help please?
User avatar
chi
Addict
Addict
Posts: 1034
Joined: Sat May 05, 2007 5:31 pm
Location: Linz, Austria

Re: What is ChkStk - unpresolved external symbol error

Post 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 ;)
Et cetera is my worst enemy
Post Reply