Compilation error when compiling libyaml under windows 7

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

I 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

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

+3
source share
1 answer

There is a patch in the ruby ​​developer community that I hope indicates a fix here . I had to manually install the yaml-0.1.3 include / yaml.h file by changing the line:

...
#ifdef WIN32
...

to

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

I'm still going, but I hope. Hope this also helps you.

+5
source

Source: https://habr.com/ru/post/1755145/


All Articles