From the Winelib User's Guide:
Quote:
Winelib is a development toolkit which allows you to compile your Windows applications on Unix.
Most of Winelib's code consists of the Win32 API implementation. Fortunately this part is 100 percent shared with Wine. The remainder consists of Windows compatible headers and tools like the resource compiler (and even these are used when compiling Wine).
So it actually does involve compiling for the native OS. Basically, wine has lots of the windows API implemented for unix already, so lots of the 'stub code and wrappers' you mentioned would be already written.
Of course, wine isn't perfect, as it has unimplemented functions and bugs, but it would probably save a lot of time and effort for porting non-platform-independent windows code.
_________________
"A dead thing can go with the stream, but only a living thing can go against it." --G. K. Chesterton