PDA

View Full Version : Using MS .libs with DevC++



taylorguitarman
03-21-2002, 10:35 AM
I'm curious if anyone knows how to convert MS .lib files into .a files to be used with DevC++. I'd like to make some of the SDL extension libraries available to DevC++ users.
I use MSVC at home but DevC++ at work (because of the small size and system limitations). All the source code is available, but I don't know the process. Are there tools like Borland's implib and impdef for gcc (mingw)?
If anyone knows the process please let me know.
Thanks.

Ken Fitlike
03-21-2002, 12:33 PM
There are tools like implib - but not as straightforward to use. Actually you've mentioned it: impdef is the tool you use. This is because DevC++ is primed for use with the windows ports of gcc ie cygwin and especially mingw. I seem to remember using dlltool as well, which comes as std with mingw binutils.

If you are familiar with impdef then good luck. If not post again and i'll dig through my files and see if I can find an example of conversion, unless someone else is able to offer more speedy help.

taylorguitarman
03-21-2002, 12:50 PM
I've got it. I did some deep digging and found two utilities.
reimp and pexport.
reimp takes the .lib and generates a .def then uses dlltool to build the .a file. Works great. pexport takes care of some slight differences in calling convention stuff that MS does if reimp doesn't work.

Thanks for the help though. Now I can convert some of the useful libraries for Bloodshed users.

taylorguitarman
03-21-2002, 01:00 PM
I'll look into it next week. :)