开发者

GCC vs Microsoft : Undefined reference to `_chkstk'?

开发者 https://www.devze.com 2022-12-25 11:06 出处:网络
I am using CodeBlocks and MinGW toolchain which is essentially GCC. I was using VStudio but I want to get away from it to do cross platform development. There seems to be some microsoft specific refer

I am using CodeBlocks and MinGW toolchain which is essentially GCC. I was using VStudio but I want to get away from it to do cross platform development. There seems to be some microsoft specific references in some libraries that I am linking, specifically in CXImage SDK (_chkstk). I presume the library was put together using VS. From my searches I have learned that GCC uses _alloca rather than _chkst开发者_运维问答k. I still want to use CXImage for some stuff I am doing. My question: Is there a way around this problem or am I stuck with ditching libs such as this if I want to use GCC?


As I said in my comment, you are most likely linking to the wrong lib files, since MinGW/gcc compiles things very differently from msvc. Always try to recompile the libraries from source with the compiler you are using to eventually link them (if you can).

0

精彩评论

暂无评论...
验证码 换一张
取 消