Gide me to use Windows DLL in a Linux application.

Alireza Mahini alireza_mahini at
Sun Mar 9 06:07:12 CST 2003

 HiI would like to use a win32 DLL in  a native Linux application.  I want to  do this by using WINE. According to the documentation that comes with the DLL, a Windows program can load it with the following code (the names have been changed to protect the innocent -- me):     HMODULE hDLL;     FARPROC lpfnFunc1, lpfnFunc2;     hDLL = LoadLibrary ("library.dll");     if (hDLL == (HMODULE) NULL)         return ERROR;     lpfnFunc1 = (LPAPPFUNC1) GetProcAddress (m_hDLL, "Function1");     lpfnFunc2 = (LPAPPFUNC2) GetProcAddress (m_hDLL, "Function2"); I created the following test program:     #include <wine/wine/winbase.h>     int main (int argc, const char *arvg[])     {         HMODULE hDLL;         hDLL = LoadLibrary ("library.dll");         if (hDLL == (HMODULE) NULL)             return 1;         else             return 0;     } When I try to build it, however, I get an "undefined reference to 'LoadLibraryA'".  Linking does not fix this.Do i try with  additional flags for g++ compiler? Or Is my code  wrong ?please ,guide me to solve this problem .RegardsAlireza Mahini

Join Excite! -
The most personalized portal on the Web!
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the wine-devel mailing list