How to refine VC++ import library LIB files for DLLs created from Lazarus or MinGW:
- dumpbin /exports file.dll(dumpbin is included in VC++)
- Use a text editor to write a def file(e.g. file.def) like the content below:
EXPORTS
functiona
functionb
functionc
…… - lib /def:file.def to create lib file
- use the lib file in compilation of application to make the application aware of DLL entry points
To use DLLs from Visual C++ to MinGW, the def files from dumpbin can be compiled into .a files(library files for GCC) with DLLTOOL in MinGW:
- dlltool -U -d file.def -l file.a
No comments:
Post a Comment