[Wine] Using winemaker / building wine DLLs
annabunches at gmail.com
Tue Jun 21 14:33:28 CDT 2011
On 06/21/2011 03:26 PM, Thunderbird wrote:
> Your win32 application will see the winelib dll as any other 'win32 dll'. If you have a win32 version of this dll, link against that one and then you can use the winelib version as drop-in replacement. Another way is to dynamically load the library using 'LoadLibrary' and 'GetProcAddress' then you don't have to link.
> I'm not sure if your winelib dll got compiled correctly though since I haven't used winemaker in about a decade. I tend to useplain winegcc/wineg++.
Thanks for the insight - I noticed here:
that I should be able to do what I want (which is, basically, call the
Unix system() function from a Windows executable) without jumping
through the hoops of creating a DLL at all.
My only problem is that using winegcc gives me very unexpected output.
winegcc claims that it "tries to provide a MinGW compatible compiler
under Linux." However, when I compile my program with MinGW, I get a
Windows executable. When I compile my program with winegcc, I get a
shell script and a Linux shared object.
Clearly, I am doing something wrong here.
I was hoping, based on this comment from the above link:
"That must be because you're calling the Unix system() function. If you
want system() to work in Wine applications you must link with msvcrt and
call its implementation of system()"
that it would be possible to link against the glibc system() call using
winegcc (with mingw32, it appears to always link against msvcrt from the
mingw32 tree, and wine then interprets that call, and does a fork/exec
instead of an actual system() call).
So, it has been suggested that what I want to do is possible, and I
think it comes down to figuring out how to use winegcc. Documentation
seems to be outdated for winegcc, because the behavior I'm seeing isn't
mentioned anywhere I've yet found.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 899 bytes
Desc: OpenPGP digital signature
More information about the wine-users