I have a Windows GUI application that runs on Wine (not Winelib). Now i want to use that code to load a native Linux .so - how can i do this?
Thanks in advance, Raghavan
On Wed, 12 May 2004 21:56:55 -0700 Raghavan Gurumurthy raghavan.gurumurthy@guptaworldwide.com wrote:
I have a Windows GUI application that runs on Wine (not Winelib). Now i want to use that code to load a native Linux .so - how can i do this?
Howso? I don't think wine has support for loading native shared libraries from windows apps. You'd have to write code to load the library (in the ELF format), map it into memory, etc.
HTH,
Tim
Raghavan Gurumurthy wrote:
I have a Windows GUI application that runs on Wine (not Winelib). Now i want to use that code to load a native Linux .so - how can i do this?
Thanks in advance, Raghavan
Write a proxy DLL that exports the functions in PE format, maps the arguments and calling convention, and calls the native so. Compile that as a winelib app.
Only winelib apps can technically call a native so, so calling your library directly from the PE is impossible without either employing a proxy, or implementing the linux loader yourself.
Shachar
On Thu, 13 May 2004 09:05:34 +0300, Shachar Shemesh wrote:
Only winelib apps can technically call a native so, so calling your library directly from the PE is impossible without either employing a proxy, or implementing the linux loader yourself.
You could add a new Wine DLL which simply exports an interface to libdl directly, assuming the calling conventions are compatible (you could set the convention when compiling the native DSO). Then it would be reasonably generic.