How do I convert Ms Import Libraries to Mingw based?
How to I convert Microsoft .lib files into compatibe mingw .a files? I know that one could use reimp but I could''t understand the intructions. Pls Help
Signature?
I''m having the same trouble too. I tried to convert a dll to an .a file by using dllwrap --dllname libname.dll --def libname.def --output-lib libname.a. However I didn''t get it to work. Your best bet is to use the dll directly by using:
#include
HINSTANCE dllhandle = 0;
void LoadDll(char*file)
{
if (!(dllhandle=LoadLibrary(file)))
{
MessageBox (NULL, "Error Loading Dll." , "Error", MB_ICONERROR |MB_OK);
ExitProcess(0);
}
}
#define DEFFUNC(f) (WINAPI *f) // define the functions as pointers
#define GETDLLFUNCTION(f)(FARPROC)f=GetProcAddress(dllhandle,#f)
Hope this helps!
Kris Dawson,
Myriad Studios
#include
HINSTANCE dllhandle = 0;
void LoadDll(char*file)
{
if (!(dllhandle=LoadLibrary(file)))
{
MessageBox (NULL, "Error Loading Dll." , "Error", MB_ICONERROR |MB_OK);
ExitProcess(0);
}
}
#define DEFFUNC(f) (WINAPI *f) // define the functions as pointers
#define GETDLLFUNCTION(f)(FARPROC)f=GetProcAddress(dllhandle,#f)
Hope this helps!
Kris Dawson,
Myriad Studios
March 06, 2001 09:01 PM
If I remeber right do you only have to do this
reimp msimportliname.lib
to create a .a for Mingw.
You can not convert dlls to static libraries. If you want to create a import library and have the def file use dlltool. dllwrap is for making it easier to _create_ dlls with Mingw.
reimp msimportliname.lib
to create a .a for Mingw.
You can not convert dlls to static libraries. If you want to create a import library and have the def file use dlltool. dllwrap is for making it easier to _create_ dlls with Mingw.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement