Creating and using HALCON packages🔗
Once the new operators have been described in DEF files and implemented (supply and action procedures) a couple of dynamic objects must be created (DLLs in Windows, shared libraries in Linux environments).
Important
Never change the name of a package or the corresponding names of the libraries/DLLs contained in a package.
These names are encoded within the libraries. If you change the names, this information will not match any longer, and the loader of the operating system will fail to open the dynamic libraries.
If you want to rename a package, create the libraries/DLLs again.
General workflow when creating an extension package🔗
More Info
For a more detailed description, see also Creating HALCON packages step by step.
In summary, the following steps are necessary to create a HALCON package with the name package integrating new operators into the HALCON system.
A detailed description of the steps can be found in the referenced sections.
As noted in Packages and HALCON XL, to create a HALCON XL package, you must create a second version of the libraries.
-
Description of the new operator(s) in one or more DEF files (see Describing operators (DEF files)). We recommend placing these files in the package subdirectory
def. -
Creation of a library (called
package) containing the supply procedures in C and the corresponding action procedures (see Style guide for programming to Special routines for typical supply procedures). This library has to be placed in the package subdirectorylib/$HALCONARCH(Linux) orbin\%HALCONARCH%(Windows). -
Creation of a library containing the language-dependent operator interfaces (
packagec,packagecpp,packagex, andpackagedotnet) based on the DEF files with the help ofhcomp(see The HALCON compilerhcomp). These libraries have to be placed in the subdirectorylib/$HALCONARCH(C, C++ under Linux) orbin\%HALCONARCH%(C, C++ under Windows) orbin\dotnetof the package. -
Generation of files for online access to the knowledge base with the help of
hcomp. These files are used, e.g., by HDevelop. They have to be placed in the subdirectoryhelpof the package. -
Generating the HTML reference files with the help of
hcomp(optional). The generated files have to be placed in the subdirectorydoc\html\referenceof the package. -
Generating PDF manuals with the help of
hcomp(optional). -
Extension of the package list in the environment variable
HALCONEXTENSIONSby the complete file path of the new package, e.g.,For some platforms, additional environment variables have to be modified; see Installing extension packages and Additional information for specific platforms.
-
Linking of the generated libraries together with the HALCON library to the image analysis application (see Creating a new HALCON package). For this, you have to modify additional environment variables, depending on the operating system. HDevelop is able to access the new operators dynamically without linkage.