Open brechtsanders opened 6 years ago
Hi @brechtsanders ,
Thank you so much for your contribution. Besides not being my primary platform, you've probably unblocked two independent lines of work: providing a MinGW-compatible version of fswatch by dropping the CygWin requirement, and resurrecting the realpath
problem.
Glad I could help. You may want to think about the stuff related to links though. My fix ignores links, but Windows does have links. However it doesn't have S_ISLNK() or lstat().
No binary for Windows? Oh.
Thank you so much for sharing what you did to get this working. Can this be upstreamed?
Absolutely!
@brechtsanders Thank you so much for this!
I tried this and it builds just fine, but I can't seem to get any output from the final binary. Not even --help
or --version
gives any output, doesn't even crash. Is this something you have seen as well? I have not tried the library yet
I'm building version 1.13.0
if that matters, I could try with 1.12.0
if that should make any difference?
@ulrikstrid I have successfully built and ran versions 1.13.0 and 1.14.0. Note that the dependancies must also work wor the application to run. In my latest build I see dependancies on the following DLLs:
In my case libiconv and libintl come from libiconv and gettext which I also built myself (including all of their dependancies). To know why your application doesn't do anything run it through gdb. Chances are gdb will tell you that it can't load some DLL...
I've also built libiconv
and gettext
. ~I see that I have this libintl-7.dll
instead of a libintl-8.dll
could that be it?~. I upgraded to latest gettext and now have the libintl-8.dll
and it still doesn't work. I manged to get it to work in CI so there is some difference between my machine and CI it seems.
Thank you for taking the time to help me out @brechtsanders
Have you tried running with GDB? It will tell you why it's exiting.
Hi, I had problems building fswatch with MinGW-w64 (both 32 and 64 bit versions), but in the end I was able to build a working version of fswatch by doing the following:
This gives me a working fswatch binary and both static and shared libraries for native Windows. I tested it and it works with windows_monitor, but not with poll_monitor, which is good enough for me.
I'm including my shell commands below (made for 1.12.0, but also working with 1.13.0). Hopefully this helps you in making a native Windows port.
Regards Brecht Sanders