I am trying to use windows dll functionality in Linux. My current solution is a compilation of 开发者_运维技巧a separate wine application, that uses dll and transfer requests/responses between dll and main application over IPC.
This works, but is a real overhead comparing to a simple dll calls.
I see that wine-compiled program usually is a bootstrapping-script and some .so, which (according to file utility) is normal linux dynamically linked library.
Are there any way to link that .so directly to my application? Are there any manual?
You may be able to use Winelib to write a Linux app that can use Windows DLLs.
EDIT:
For future reference:
libtest.c
:
#include <stdio.h>
#include <windows.h>
int main(int argc, char* argv[])
{
HMODULE h;
h = LoadLibrary("cards.dll");
printf("%d\n", h);
}
Execution:
$ winegcc -m32 libtest.c
$ ./a.out
536936448
精彩评论