中国开发网: 论坛: 程序员情感CBD: 贴子 50259
bigshrimp: 见内
1) Get list of object files in library.

LIBMAN -LIST Library.lib > Objects.txt

2) Extract object file that contains wanted function(s) and extract also object files that
contain variables and functions referenced from the first object file.
(Sometimes are some of variables and functions present in initialization codes, then
the task becomes difficult - you must run this init code before calling wanted function).

LIBMAN -EXTRACT:Object.obj Library.lib

3) If Object.obj is in COFF, convert it to OMF.

COFF2OMF Object.obj

(COFF2OMF is a utility that converts COFF file to OMF file. This utility is shipped
with the Digital Mars C/C++ package (www.digitalmars.com). Do not confuse it with tool
with the same name that is present in Borland C++ package and that serves for converting
import libraries.)

4) Convert OMF to widely acceptable OMF.

OMF2D Object.obj /OLNames.opt /OENames.opt >Object.dh

(It is recommended to use DFix.bat. Set the right paths in this file.)

5) Add files to Delphi project:
{$I Object.dh}
{$L Object.obj}

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录