GOBJECT:无法解析的外部符号___chkstk_ms [英] GOBJECT : unresolved externals symbol ___chkstk_ms

查看:456
本文介绍了GOBJECT:无法解析的外部符号___chkstk_ms的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio中编译GOBJECT时,我遇到了以下两个问题 错误:

On compiling GOBJECT in Visual Studio, I came across below two errors:

Error   5   error LNK1120: 1 unresolved externals   C:\gtk_compilation\glib\glib-2.46.0\build\win32\vs12\Debug\Win32\bin\gobject-2-vs12.dll gobject
Error   4   error LNK2019: unresolved external symbol ___chkstk_ms referenced in function _ffi_call C:\gtk_compilation\glib\glib-2.46.0\build\win32\vs12\libffi.lib(ffi.o)  gobject

我使用这里,但 像下面这样给./configure提供了额外的标志.

I recompiled the libffi using the procedure described here but with extra flags given to ./configure like below.

cflags="-fno-stack-check -fno-stack-protector -mno-stack-arg-probe"

我希望它将摆脱___chkstk_ms调用.

which i hope will get rid of the ___chkstk_ms invocations.

在libffi的makemake install之后,我将libffi.a重命名为libffi.lib,将libffi.dll.a重命名为libffi.dll,并将它们复制到适当的目录中.

After make and make install of libffi, I renamed the libffi.a to libffi.lib and libffi.dll.a to libffi.dll and copied them to appropriate directories.

然后我在Visual Studio中重新构建gobject项目,但遇到了相同的错误 我在开始时提到过. :(

Then I re-build the gobject project in visual studio and I got the same error which I mentioned in the beginning. :(

从这篇帖子中,我想问题的根源在于我正在使用两个编译器.但是我没有办法解决它.我试图编译 使用Visual Studio Projects的libffi可用,但需要数小时的努力 徒劳无功.

From this post, I guess the problem's root is that I am using two compilers. But i don't see a way to get around it. I tried to compile the libffi using Visual Studio Projects available, but hours of efforts were in vain.

推荐答案

我使用了但是,您需要将

sizet z = (*p_arg)->size;

unsigned long long  z = (*p_arg)->size;

因为typedef无效(由于某种原因在这里有效).

because the typedef is not (for some reason effective here).

这篇关于GOBJECT:无法解析的外部符号___chkstk_ms的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆