Home > Tools User's Guide

Package Builder

A package is a convenient way to gather code and data into a single precompiled, easily redistribuable file. Using packages, one can for example provide HB++ extensions, such as user controls or data access classes, without having to release its source code. In a sense, packages offer the same fonctionnality as static libraries for C/C++ compilers, or units for Delphi compilers.

Any of the files that usually make up an HB++ application can be embedded into a package, ie forms, classes, modules, user controls, image families, binary resources and tables. When a programmer inserts a package into his project, it is almost exactly the same as if they had included separately each of the files contained in that package. The main difference is that they won't be able to see or edit any source code. Note however that you cannot embed a package into another package.

When building a package, you can restrict its usage based on HB++ version number or edition. This can prove useful if some part of the code in a package relies on a feature that is not available in all HB++ versions. When a programmer inserts such a package into its project and compiles using an unauthorized HB++ version, a compile time error is reported.

The following topics covers the process of building and using packages with HB++.