libfyaml icon indicating copy to clipboard operation
libfyaml copied to clipboard

Add the support for Windows

Open arttet opened this issue 5 years ago • 4 comments

Failed to build on Windows using MinGW.

For example,

  • '_SC_PAGESIZE' undeclared in fy-emit.c:1946:22
  • There's no alloca.h in Windows

arttet avatar Nov 18 '19 05:11 arttet

Will be addressed by using an additiional meson build system. Getting automake to work on windows is not going to work.

pantoniou avatar May 13 '20 17:05 pantoniou

I was able to build this, and build and run the examples on Windows in an MSys2/Mingw64 environment.

mseelye avatar Jul 04 '20 08:07 mseelye

I would like to see the library to be native compilable under Microsoft C, so there are no dependencies on MSys2 and Mingw64 libraries. But in order to compile this under MS C a huge amount of GNU dependencies need to be changed. And I am not sure if this is an easy task. Since most of the macros use GNU compiler specialies. The build system is not a big deal in my opinion.

Am I the only one interested in a plain windows dll without further dependencies?

hapejot avatar Aug 21 '22 09:08 hapejot

Just built and run some examples under windows with reduced perf and functionality:

  • disabled fy-tool
  • commented mmap-related functionality
  • commented termios related things (probably slightly affects output in diag)
  • some calls to alloca replace with malloc
  • others with _alloca

Not sure will I contribute it or not soon, because I still need to run tests properly and make my changes readable

Enjection avatar Jan 26 '23 15:01 Enjection