Compile error while compiling libyaml under windows 7

邮差的信 提交于 2019-12-06 08:12:37

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/3273486/compile-error-while-compiling-libyaml-under-windows-7

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!