From How To Create 32-bit Import Libraries Without .OBJs or Source
Given a .DLL with functions exported via a C interface, you can create an import library by following these steps:
- Use DUMPBIN /EXPORTS <.DLL file name> to obtain the list of exported symbols for the .DLL in question. The symbols appear in the "name" column of the table whose headings are "ordinal hint name."
- Create a .DEF file that contains an EXPORTS section with the names of the functions listed in the "name" column of the DUMPBIN output.
- For _cdecl functions, the symbol appears just as it would when used in the calling program. Just place this symbol in the EXPORTS section of the .DEF file.
- Use LIB /DEF:<.DEF file name> to generate the import library and exports file. The base name of the import library will be the base name of the .DEF file. Use /OUT: to control the output library name.
I don't know if there's a tool/script out there that will automate all this for you, so you may have to write one.
If you have access to the compiled .obj files, you can just re-link the objs instead of doing what the above links suggest.