I built libbz2 (static variant) using MinGW (GCC 4.5.0) compilation system and now try to import this library into my MSVS2008 project.
I’ve done these things already and everything worked fine, for example, with zlib (which means that created C libraries are actually interchangeable).
However, when doing the same with libbz2, I face some unknown troubles – when I compile my MSVS2008-project I receive the following error on linking stage:
unresolved external symbol ___chkstk referenced in function _bzopen_or_bzdopen
I don’t know why this happens (I think it’s because some basic C runtimes are not fully compatible), but maybe someone knows how to fix this kind of error?
Maybe there is a manual way to somehow merge the implementation of MinGW-based ___chkstk into libbz2 static library?
Thank you.
I read your answer, but I think there’s an easier (automatic) way of doing the manual merging of object files: use the CFLAG
-static-libgcc, which will link in the necessary functions (what you are describing and doing manually).