Are there any advantages to compiling my Windows application with winelib for Linux users? Why not just give them the .exe and let them run it with Wine? Seems just like extra work for no gain.
Googling a bit on the topic seems to show that compiling against winelib is a way to improve wine by putting in evidence issues at compilation which shouldn't arise if wine (hence winelib) was a perfect win32 api implementation replacement. For your application in itself, it's a way of checking compatibility with wine.
Quoting Chapter 1. Winelib Introduction - 1.1. What is Winelib? :
What you gain by recompiling your application with Winelib is the ability to make calls to Unix APIs, directly from your Windows source code.
This allows for a better integration with the Unix environment than is allowed by running an unmodified Windows application running in Wine.
Another benefit is that a Winelib application can relatively easily be recompiled on a non-Intel architecture and run there without the need for a slow software emulation of the processor.
You might want to read on Advantages and Disadvantages of using Winelib.
See this
Anon: I take it that means all winelib-ported apps are NOT true linux binaries - but some >half-breed between win32 binaries and Linux binaries? What is then the advantage of porting >(using winelib)as opposed to running win32 binaries under wine?
Dimi Paun: They are true Linux binaries (ELF format) but they need a bit of setup (for >Windows compat) before they start. But yes, running the Win32 (PE) executables instead is >a true possibility, same speed, etc. But having a Winelib port allows you to better >integrate with the Unix env, which may be what you want for a 'true' Linux app.
One good reason is that it might provide some insurance against regressions in Wine. If you test your code with version A of Winelib and statically link that version with your program, then regressions in a newer version of Wine can't break you.