Search code examples
delphipackagebpl

Delphi BPL search path


Every BPL-related question found by me in Internet refers to some BPL already shipped with Delphi or at least installed globally, into Delphi folders.

I would like to make my own application to find a run-time BPL file made by me, without saving global paths anywhere, without registering my package in Delphi globally. Only put BPL file into "packages" subdirectory, define search path and compile.

Project Options
  Delphi Compiler
    Search path: I defined relative path to my BPLs (packages folder) here
  Packages
    Runtime Packages
      Link with runtime packages = True
      Runtime packages: defined my BPL's name here, without extension

The problem is that compiler can't find my package although I have added the packages subdirectory to Project Options.

How to make it find my package?


Solution

  • The compiler doesn't need your BPL file. It needs the corresponding DCP file, as well as the DCU files for the units you use. Make sure those files' directories are on your search path, and your project should compile fine.