views:

155

answers:

5

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.

+1  A: 

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.

Zeograd
+4  A: 

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.

Pascal MARTIN
So basically the two advantages are being able to call Unix-specific APIs if I wanted to (not likely if I want to keep it compatible with windows), and porting to obscure architectures (sorry PPC,ARM,SPARC fans :P)
davr
If you ever find yourself doing any dev for embedded systems, or perhaps something like a PS3, or whatever that doesn't have x86...
supercheetah
+4  A: 

You might want to read on Advantages and Disadvantages of using Winelib.

Kornel Kisielewicz
+2  A: 

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.

Dmitry
+1  A: 

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.

dsimcha