API (*.bpi)

From RAD Studio
Jump to: navigation, search

Go Up to File Types Index

When you build a package, RAD Studio generates a package import library file if:

  • Your package is a Delphi package and you use the "Generate all C++Builder files (including package libs)" value for the C/C++ Output file generation option in Project > Options > Delphi Compiler > Output - C/C++.
  • Your package is a C++ package and you enable the Generate import library option in Project > Options > C++ Linker.

Projects that use your package must pass this file to the linker to resolve references to functions in your package.

Note: When you are compiling for the macOS target platform, you can link with a package import library file, but the file you deploy on the Mac is a shared library file.

When you build your package, your package import library file is generated by default as <package>.bpi into the following folder:

  • For 32-bit Windows: C:\Users\Public\Documents\Embarcadero\Studio\22.0\DCP
  • For other platforms in Delphi: C:\Users\Public\Documents\Embarcadero\Studio\22.0\DCP\<platform>
  • For other platforms in C++: C:\Users\Public\Documents\Embarcadero\Studio\22.0\DCP\<platform>\<build configuration>

To change the output directory:

  • In Delphi, use the C/C++ .bpi output directory (package import libraries) option in Project > Options > Delphi Compiler > Output - C/C++.
  • In C++, use the BPI/LIB output option in Project > Options > C++ (Shared Options).

See Also