Advertisement

How do I convert Ms Import Libraries to Mingw based?

Started by March 05, 2001 07:58 AM
2 comments, last by Untitled 23 years, 11 months ago
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?
HELPPPp!!!!!!!!!!!!
ANYONE OUT THERE??????????????
Signature?
Advertisement
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
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.

This topic is closed to new replies.

Advertisement