在Windows 7下编译libyaml时编译错误

Lis*_*nge 3 yaml compilation

我想用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
Run Code Online (Sandbox Code Playgroud)

还有其他人看过这个错误吗?你们和男士们都知道如何解决这个问题吗?

小智 5

ruby安装程序社区周围有一个补丁,我希望能在这里找到解决方法.我不得不手动修补yaml-0.1.3 include/yaml.h文件,更改行:

...
#ifdef WIN32
...
Run Code Online (Sandbox Code Playgroud)

...
#if defined(__MINGW32__)
#   define  YAML_DECLARE(type)  type
#elif defined(WIN32)
...
Run Code Online (Sandbox Code Playgroud)

我还在编译,但我很有希望.希望这也会对你有所帮助.