Package Static Library File (*.lib, *.a)

From Appmethod Topics
Jump to: navigation, search

Go Up to File Types Index


Appmethod generates a package static library file:

  • When you build a Object Pascal package for iOS Device or Android.
  • When you build a Object Pascal package for a desktop platform and you use the "Generate all Appmethod C++ files (including package libs)" value for the C/C++ Output file generation option in Project > Options > Object Pascal Compiler > Output - C/C++.
  • When you build a C++ package and you enable the Generate static package library (.lib) option in Project > Options > C++ Linker.

A package static library file is a static library file generated from a package. You use a static library in place of an import library when your application does not use run-time packages. See Building Static Packages.

The file name of your package static library file is:

  • <package>.lib for 32-bit Windows.
  • <package>.a for 64-bit Windows and Mac OS X.
  • lib<package>.a for iOS Device and Android.
    Note: You can not generate a package static library file for iOS Simulator.

When you build your package that meets the requirements, your package static library file is generated by default into the following folder:

  • For 32-bit Windows in Object Pascal and C++: C:\Users\Public\Documents\Embarcadero\Studio\17.0\Dcp
  • For other platforms in Object Pascal: C:\Users\Public\Documents\Embarcadero\Studio\17.0\Dcp\<platform>
  • For other platforms in C++: C:\Users\Public\Documents\Embarcadero\Studio\17.0\Dcp\<platform>\<build configuration>

To change the output directory:

  • In Object Pascal, use the C/C++ .obj/.lib output directory option in Project > Options > Object Pascal Compiler > Output - C/C++. If left blank, the DCP output directory specified in Project > Options > Object Pascal Compiler is used.
  • In C++, use the BPI/LIB output option in Project > Options > C++ (Shared Options).

See Also