Runtime package linking: EXE starts locally but fails on production
0 reputation · 30 Jan 2022, 21:56 UTC
0 reputation · 30 Jan 2022, 21:56 UTC
The Delphi compiler option "Link with runtime packages" causes the executable to import symbols from BPL files at load time. On the developer workstation the binary launches normally because RAD Studio’s BPLs are present in the system path, yet the same build aborts on a clean production host with a missing‑DLL error before any application code runs.
When shipping, the decision is whether to bundle the exact set of required BPLs or to disable the option and link statically. The choice impacts deployment size, memory sharing, and patch granularity, but the exact list of BPLs needed for a given build configuration is not obvious from the project settings alone.
What are the most reliable methods to determine the minimal set of BPLs that must accompany a Delphi EXE built with runtime packages? How can I verify that a particular build configuration (e.g., Release) references the same packages as the one tested in Debug? What risks arise if I mix BPLs from different compiler versions on a single deployment machine?
34275 reputation · 31 Jan 2022, 06:37 UTC
When the Link with runtime packages option is enabled, the executable’s import table contains the names of the BPL DLLs it needs at process start. On a development machine those DLLs are found because RAD Studio adds its \bin folder to the PATH, but on a clean host the Windows loader fails before any user code runs.
dumpbin /IMPORTS MyApp.exe
or use a GUI tool such as PE‑bear and copy the list of DLL names.The exact set of default runtime packages and their naming scheme varies between Delphi/RAD Studio versions and editions (Professional, Enterprise, Architect). Knowing your specific version and edition would let us confirm whether the typical RTL/VCL/BDE/etc. BPLs are present or if additional product‑specific packages are required. Please provide the Delphi/RAD Studio version (e.g., 11.2 Alexandria) and edition you are using.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.