⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 faq85.htm

📁 C++builder学习资料C++builder
💻 HTM
字号:


<HTML>

<HEAD>

   <TITLE>Determine which DLLs are needed by a program</TITLE>

   <META NAME="Author" CONTENT="Harold Howe">

</HEAD>

<BODY BGCOLOR="WHITE">



<CENTER>

<TABLE  BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH="640">



<TR>

<TD>

<H3>

Determine which DLLs are needed by a program

</H3>

<P>

Use the command line utility <TT>TDUMP.EXE</TT> that comes with C++Builder. <TT>TDUMP</TT> will list the imported

modules of a program if you pass it the command line parameter "<TT>-em.</TT>". Note the trailing period. To list the

imported DLLs from <TT>PROJECT1.EXE</TT>, execute this command from a DOS prompt:

</P>

<PRE>

tdump -em. project1.exe

</PRE>

<P>

The text below shows the output of <TT>TDUMP</TT>. In this example, the project was compiled with the dynamic RTL

option on, but with runtime packages turned off.

</P>

<PRE>

C:\CBuilder4\Projects>tdump -em. project1.exe | more

Turbo Dump  Version 5.0.16.6 Copyright (c) 1988, 1999 Inprise Corporation

                   Display of File PROJECT1.EXE



IMPORT:     borlndmm.dll

IMPORT:     ADVAPI32.DLL

IMPORT:     KERNEL32.DLL

IMPORT:     COMCTL32.DLL

IMPORT:        GDI32.DLL

IMPORT:       USER32.DLL

IMPORT:        OLE32.DLL

IMPORT:     OLEAUT32.DLL

IMPORT:     cp3245mt.dll

</PRE>

<BR>

<P>

The files <TT>borlndmm.dll</TT> and <TT>cp3245mt.dll</TT> are the dynamic RTL DLLs. When I uncheck the RTL checkbox

and statically link with the runtime libraries, the output from <TT>TDUMP</TT> becomes:

</P>

<PRE>

C:\CBuilder4\Projects>tdump -em. project1.exe

Turbo Dump  Version 5.0.16.6 Copyright (c) 1988, 1999 Inprise Corporation

                   Display of File PROJECT1.EXE



IMPORT:     ADVAPI32.DLL

IMPORT:     KERNEL32.DLL

IMPORT:     COMCTL32.DLL

IMPORT:        GDI32.DLL

IMPORT:       USER32.DLL

IMPORT:        OLE32.DLL

IMPORT:     OLEAUT32.DLL

</PRE>

<BR>

<P>

When I turn off the runtime libraries option, the compiled program no longer depends on

<TT>borlndmm.dll</TT> and <TT>cp32345mt.dll</TT>.

</P>

<P>

<B>Note:</B> <TT>TDUMP</TT> can only list the DLLs that are implicitly linked to the project using an import library.

<TT>TDUMP</TT> does not list DLLs that loaded with the <TT>LoadLibrary</TT> API function.

</P>





</TD> </TR>



</TABLE>

</CENTER>

</BODY>

</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -