查看bpl 引用的dll

When we write and compile a Delphi application, we typically generate an executable file - a standalone Windows application. Unlike Visual Basic, for example, Delphi produces applications wrapped in compact exe files, with no need for bulky runtime libraries (DLL's).

当我们编写和编译Delphi应用程序时,通常会生成一个可执行文件-一个独立的Windows应用程序。 例如,与Visual Basic不同, Delphi可以将应用程序封装在紧凑的exe文件中,而无需庞大的运行时库(DLL)。

Try this: start Delphi and compile that default project with one blank form, this will produce an executable file of about 385 KB (Delphi 2006). Now go to Project - Options - Packages and check the 'Build with runtime packages' check box. Compile and run. Voila, the exe size is now around 18 KB.

尝试以下操作:启动Delphi并使用一个空白表格编译该默认项目,这将产生大约385 KB的可执行文件(Delphi 2006)。 现在转到项目-选项-包,然后选中“使用运行时包构建”复选框。 编译并运行。 瞧,exe的大小现在约为18 KB。

By default the 'Build with runtime packages' is unchecked and every time we make a Delphi application, the compiler links all the code your application requires to run directly into your application's executable file. Your application is a standalone program and doesn't require any supporting files (like DLLs) - that's why Delphi exe's are so big.

默认情况下,“使用运行时程序包构建”是未选中的,并且每次我们制作Delphi应用程序时,编译器会将应用程序需要直接运行的所有代码直接链接到应用程序的可执行文件中 。 您的应用程序是一个独立程序,不需要任何支持文件(例如DLL)-这就是Delphi exe这么大的原因。

One way of creating smaller Delphi programs is to take advantage of 'Borland package libraries' or BPL's in short.

创建较小的Delphi程序的一种方法是利用“ Borland软件包库”或简称BPL。

什么是包裹? ( What's a Package? )

special dynamic-link library used by Delphi applications Delphi应用程序使用的特殊动态链接库

Packages enable us to place portions of our application into separate modules that can be shared across multiple applications. Packages, also, provide a means of installing (custom) components into Delphi's VCL pallete.

包使我们能够将应用程序的各个部分放置到可以在多个应用程序之间共享的单独模块中。 软件包还提供了一种将(自定义)组件安装到Delphi的VCL托盘中的方法。

Therefore, basically two types of packages can be made by Delphi:

因此,Delphi基本上可以制作两种类型的软件包:

  • Run-time packages - provide functionality when a user runs an application - they operate much like standard DLLs. 运行时程序包-在用户运行应用程序时提供功能-它们的运行方式与标准DLL非常相似。
  • Design-time packages - used to install components in the Delphi IDE and to create special property editors for custom components.

    设计时软件包-用于在Delphi IDE中安装组件并为自定义组件创建特殊的属性编辑器。

From this point this article will deal with run-time packages and how they can help Delphi programmer.

从这一点出发,本文将介绍运行时软件包以及它们如何帮助Delphi程序员。

One wrong mit: you are not required to be a Delphi component developer to take advantage of packages. Beginner Delphi programmers should try working with packages - they'll get better understanding of how packages and Delphi work.

一个错误的秘诀 :您无需成为Delphi组件开发人员即可利用软件包。 初学者的Delphi程序员应该尝试使用软件包-他们将更好地了解软件包和Delphi的工作方式。

何时以及何时不使用软件包 ( When and when Not ot Use Packages )

DLLs are most commonly used as collections of procedures and functions that other programs can call. Besides writing DLLs with custom routines, we can place a complete Delphi form in a DLL (for example an AboutBox form). Another common technique is to store nothing but resources in DLLs. More information on how Delphi operates with DLLs find in this article: DLLs and Delphi.

DLL最常用作其他程序可以调用的过程和函数的集合。 除了使用自定义例程编写DLL外,我们还可以在DLL中放置完整的Delphi表单(例如AboutBox表单)。 另一种常用的技术是在DLL中只存储资源。 有关Delphi如何使用DLL的更多信息,请参见本文: DLL和Delphi 。

Before going on to comparison between DLLs and BPLs we have to understand two ways of linking code in an executable: static and dynamic linking.

在继续比较DLL和BPL之间之前,我们必须了解两种在可执行文件中链接代码的方式:静态链接和动态链接。

Static linking means that when a Delphi project is compiled, all the code that your application requires is directly linked into your application's executable file. The resulting exe file contains all the code from all the units that are involved in a project. Too much code, you might say. By default, uses clause for a new form unit list more than 5 units (Windows, Messages, SysUtils, ...). However, the Delphi linker is smart enough to link only the minimum of code in the units actually used by a project. With static linking our application is a standalone program and doesn't require any supporting packages or DLLs (forget BDE and ActiveX components for now). In Delphi, static linking is the default.

静态链接意味着编译Delphi项目时,应用程序所需的所有代码都直接链接到应用程序的可执行文件中。 生成的exe文件包含项目中涉及的所有单元的所有代码。 您可能会说,代码太多。 默认情况下,uses子句用于一个新的表单单位列表,该列表超过5个单位(Windows,Messages,SysUtils等)。 但是,Delphi链接器非常聪明,仅可以链接项目实际使用的单位中的最少代码。 通过静态链接,我们的应用程序是一个独立程序,不需要任何支持程序包或DLL(现在不再需要BDE和ActiveX组件)。 在Delphi中,默认为静态链接 。

Dynamic linking is like working with standard DLLs. That is, dynamic linking provides functionality to multiple applications without binding the code directly to each application - any required packages are loaded at runtime. The greatest thing about dynamic linking is that loading of packages by your application is automatic. You don't have to write code to load the packages neither you have to change your code.

动态链接就像使用标准DLL。 也就是说,动态链接可为多个应用程序提供功能,而无需将代码直接绑定到每个应用程序-任何必需的程序包都会在运行时加载。 动态链接的最大优点是,应用程序自动加载程序包。 您无需编写代码来加载软件包,也无需更改代码。

Simply check the 'Build with runtime packages' check box found on the Project | Options dialog box. The next time you build your application, your project's code will be linked dynamically to runtime packages rather than having units linked statically into your executable file.

只需在Project | Project(项目)上选中“使用运行时软件包生成”复选框即可。 选项对话框。 下次构建应用程序时,项目代码将动态链接到运行时包,而不是将单元静态链接到可执行文件中。

翻译自: https://www.thoughtco.com/bpl-vs-dll-1058181

查看bpl 引用的dll

查看bpl 引用的dll_BPL与DLL相关推荐

  1. Bpl的使用以及与Dll的区别

    Bpl就是Dll,这句话当然没错.   简单的例子,当然可以做,而且可以做得很好,我就曾把左兄的离线浏览器改成了这样一 个版本: 实现多个数据连接方式,ADO.DOA.ODAC.IBX.KAO,每个连 ...

  2. dll.a和lib 引用MinGW生成的dll.a后出现的问题

    在安装nlopt优化库的时候遇到了一个问题,就是安装包中没有.lib文件,只有.dll.a文件,所以就各种搜,终于找到了一个解决办法,如下所示: 下面的文章转载自https://www.cnblogs ...

  3. C# 注册DLL至GAC 并在添加引用中使用该DLL

    1,创建一个强签名的类库 类库属性中新建秘钥文件 或者使用工具 使用命令sn -k mykey.snk生成snk文件.生成好的文件在C:\Windows\SysWOW64路径下. 2,管理员身份运行 ...

  4. 解决添加Com引用 生成的Interop.*.dll 版本号永远是1.0的问题

    在项目里面,添加对COM的引用时,自动生成了Interop.*.dll,但是这个dll的版本号永远是1.0. 如果使用InstallShield 制作安装包,进行修改安装时,这个dll不会被更新,就因 ...

  5. 这个工具可以快速查看文章引用、获取全文、研究者状态

    简洁的界面.飞快的速度.有影响力的学者.杂志.机构.会议 文章的引用量,相关的参考文献.引文,合法的全文获取 单个学者的引用.是否处于高产期.以及最有影响力的文章 网址:https://academi ...

  6. linux查看进程加载了哪些dll,linux下动态链接库的加载及解析过程

    http://hi.baidu.com/hust_chen/blog/item/54a8c516231d0c0ec93d6d3e.html linux下动态链接库的加载及解析过程(ZZ) 2008-1 ...

  7. [Swift]求最大公约数和最小公倍数【用微信查看本文链接可查看到引用图片】

    ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ ➤微信公众号:山青咏芝(shanqingyongzhi) ➤博客园地址:山青咏芝(https://www.cnblog ...

  8. 时尚星球_时尚和科技属于一起吗?

    时尚星球 It's always weird seeing Hermès, the French high fashion brand, paired with Apple on the Apple ...

  9. 主题:程序的扩展性(BPL+DLL)

    主题:程序的扩展性(BPL+DLL) 主题:程序的扩展性(BPL+DLL) 时间:星期一下午(2004-11-22 15:00) 主持:A1 / A3 关联 A3的Demo: http://www.h ...

最新文章

  1. vue中点击导航栏部分,页面切换
  2. php如何查找业务bug,一般从php网站找bug怎么开始
  3. 多备份cloud 5技术:传统数据备份思路的完美移植
  4. 中南林科大c语言程序设计,2017年中南林业科技大学计算机与信息工程学院802C语言与数据结构之C程序设计考研题库...
  5. mssql导出数据到mysql_MSSQL数据导出到MYSQL
  6. undertale人物_传说之下所有人物的照片
  7. java 课后习题 冒泡排序的运用
  8. 【设计模式】适配器模式 Adapter Pattern
  9. 米斯特白帽培训讲义 漏洞篇 弱口令、爆破、遍历
  10. 机器学习实战——决策树:matplotlib绘图
  11. iOS 常见的JS与iOS交互的需求与解决方案
  12. 根据输入时间判断年龄是否在18~68周岁之间
  13. 干货 | 平面设计、UI 设计和视觉设计的区别
  14. bc547可以用8050代换吗_常用三极管代换型号
  15. 微信公众号 返回40163
  16. 常见的图片格式及适用情况
  17. 读科研经费陷“无底黑洞”有感
  18. 《C++ Concurrencyin Action》第10章--多线程程序的测试和调试
  19. Go 程序崩了?煎鱼教你用 PProf 工具来救火!
  20. java 字符串不等于_java中字符串不等于怎么判断

热门文章

  1. 安徽科技学院 信网学院网络文化节 陈旭
  2. after all 用法, although but 用法
  3. C++对高维vector数组排序 sort()函数第三个参数自定义
  4. 边缘计算系列之MEC介绍
  5. 搭建Android+QT+OpenCV环境,实现“单色图片着色”效果
  6. mysql字符集与校对规则设置_mysql中的字符集和校对规则(mysql校对集)
  7. Python - - 面向对象 - - 初始面向对象
  8. python中random模块
  9. 【已解决】 com.rabbitmq.client.ShutdownSignalException: connection error; protocol meth
  10. Windows系统中npm install时遇到npm WARN checkPermissions Missing write access to问题