windows 7下编译libyaml时出现编译错误

发布于 2024-09-09 22:55:47 字数 301 浏览 4 评论 0原文

我正在尝试使用 MingW 在 Windows 7 下编译 libyaml。

我尝试编译 0.1.2 和 0.1.3,但收到此错误:

api.c:579: error: failure in redeclaration of 'yaml_token_delete': dllimport'd symbol lacks external linkage.
api.c:579: confused by earlier errors, bailing out

还有其他人看到此错误吗?小伙伴们知道怎么解决吗?

I am trying to compile libyaml under Windows 7 with MingW.

I have tried to compile 0.1.2 and 0.1.3 but I get this error:

api.c:579: error: failure in redeclaration of 'yaml_token_delete': dllimport'd symbol lacks external linkage.
api.c:579: confused by earlier errors, bailing out

Have anyone else seen this error? Do you guys and gals know how to fix it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

涫野音 2024-09-16 22:55:47

ruby 安装程序社区中有一个补丁,我希望它能够修复 此处。我必须手动修补 yaml-0.1.3 include/yaml.h 文件,将行:更改

...
#ifdef WIN32
...

...
#if defined(__MINGW32__)
#   define  YAML_DECLARE(type)  type
#elif defined(WIN32)
...

我仍在编译,但我充满希望。希望这也会对您有所帮助。

There is a patch floating around the ruby installer community that I'm hoping points to a fix here. I had to manually patch the yaml-0.1.3 include/yaml.h file, changing the line:

...
#ifdef WIN32
...

to

...
#if defined(__MINGW32__)
#   define  YAML_DECLARE(type)  type
#elif defined(WIN32)
...

I'm still compiling, but I'm hopeful. Hopefully this will help you also.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文