1. Home
  2. Computing & Technology
  3. Delphi Programming

BPL vs. DLL
Programming with run-time packages

By , About.com Guide

Besides the DPK file with the source file, Delphi generates a BPL file with the dynamic lik version of the package and a DCP file with the symbol information. The DCP is nothing more that the sum of the symbol information of the DCU files of the units contained in the package. Check out "Filename Extensions in Delphi" for more on file types created by Delphi.

Programming with run-time packages

As stated earlier to use dynamic linking in your applications you don't have to write code to load the run-time packages neither you have to change/rewrite your code. Only one visit to Project | Options will do the trick. Packages listed in the Runtime Packages edit box are automatically linked to your application when you compile. To use a custom runtime package with an application, choose Project | Options and add the name of the package to the Runtime Packages edit box on the Packages page. Of course, be sure to check a 'Build with runtime packages' check box.

Note: although an application is linked to run-time packages, the program's units must list all the units they require in the uses clause. Compiling with run-time packages only tells the application where to find it's component code.

Packages, of course, enable us to store Delphi forms - like About Boxes - inside them. See "Dynamic World of Packages" on how to store a Delphi form inside a BPL. Find out about dynamically embedding forms into an application from runtime packages.

When deploying an application that uses run-time packages, make sure that your users have the executable file as well as all the library (.BPL or .DLL) files that the application needs. If the library files are in a different directory from the .EXE file, they must be accessible through the user’s Path (autoexec.bat). The best place would be in the Windows\System directory.

If you've come this far...
Packages give you flexibility in deciding how to deliver your applications and also make installing custom components easier. Additionally, packages reduce the size of applications using them.

Explore Delphi Programming
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming
  4. Coding Delphi Applications
  5. BPL vs. DLL; Packages vs. Dynamic Link Libraries in Delphi programming

©2009 About.com, a part of The New York Times Company.

All rights reserved.