Combining Fuse and Wine - What's the best way?
stefan at codeweavers.com
Wed Dec 24 08:52:19 CST 2008
> I'm writing a program in which I have a Windows DLL that I need to load.
The DLL contains a function that
> returns a pointer to some data, and I want to expose that data as file
data in a Fuse file system.
> My first thought was that I could have the program load the DLL using
winelib, but I'm not sure what's
> involved in this and whether the resulting program could also use the Fuse
libraries. I'm a bit of a
> novice to Wine, and Linux programming in general, so I'd appreciate any
expert opinions you guys have about
> the best way to do this.
Unfortunately you can't just link to winelib with -lwine or something,
because the Wine DLLs(and most likely the Windows DLL) need some extra
services running to work properly. That includes things like a certain
memory layout, the registry, etc.
You have to use winegcc(see 'winemaker' for starting points). That way your
app is compiled to a .exe.so file that can be run with 'wine foo.exe.so' or
with a helper script. This application is a native Linux app, and it can
link to Linux libraries like Fuse, and at the same time use Win32 API calls
from Wine and e.g. open a DLL with LoadLibrary.
More information about the wine-devel