Winelib's role in converting Windows applications

Daniel Kegel dank at
Fri May 6 21:08:46 CDT 2005

Ira Krakow (ikrakow_1999 at wrote:
> At Wineconf, I had a number of conversations about
> Winelib's role in converting Windows apps.  The
> consensus seems to be that the most efficient
> conversion path is for much of the Windows app to stay
> in Visual C++ (or whatever) and that only the modules
> that specifically require native Linux calls should be
> recompiled, via MinGW/Dev-C++ on the Windows side, and
> Winemaker on the Linux side, into Winelib objects.  
> For example, if the application requires PAM
> authentication, or a Linux-based help system, these
> modules would be separated out and encapsulated as
> Winelib objects.  I was thinking of using PAM
> authentication as a good example, since it works for
> any authentication scheme that the application
> requires.  

There are two other reasons to use winelib:

1) if your code uses SEH (structured exception handling),
    you have a problem.  This technique is patented by Borland,
    or maybe by Sun, see
    so the official gnu gcc can't support it.  You can
    apply an unoffical patch
    or you may be able to use winelib plus some clever macros

2) if you want to reach non-x86 platforms (e.g. MacOSX/PPC, Solaris/Sparc)
    winelib is the only way to go until projects like Darwine
    integrate a CPU emulator.

- Dan

More information about the wine-devel mailing list