在Windows 7下编译libyaml时编译错误 [英] Compile error while compiling libyaml under windows 7
本文介绍了在Windows 7下编译libyaml时编译错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图编译0.1.2和0.1.3但我得到这个错误:
p> api.c:579:错误:重新声明yaml_token_delete失败:dllimport'd符号缺少外部链接。
api.c:579:由早期错误混淆,掏空
这个错误?
解决方案
有一个补丁浮动在ruby安装程序社区,我希望指向修复此处。我不得不手动修补yaml-0.1.3 include / yaml.h文件,更改行:
...
#ifdef WIN32
...
到
...
#if defined(__ MINGW32__)
#define YAML_DECLARE(type)type
#elif defined )
...
我还在编译,但我有希望。希望这也会帮助你。
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?
解决方案
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.
这篇关于在Windows 7下编译libyaml时编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文