7.2.6   Additional Information for Specific Platforms

The previous sections summarized the generation of HALCON extensions in general. This section contains additional information for specific platforms. The main differences concern the name handling and the generation of shared libraries / DLLs.

7.2.6.1   Generating Packages Under Windows

In order to activate a package, its complete path, e.g.

    %HALCONEXAMPLES%\extension_package\halconuser

must be included in the environment variable HALCONEXTENSIONS. In the Windows version the package paths in HALCONEXTENSIONS are separated by semicolons.

Note, that DLLs must be stored in the subdirectory bin\%HALCONARCH% of the package, the corresponding libraries in the subdirectory lib\%HALCONARCH%.

The directory %HALCONEXAMPLES%\extension_package\halconuser contains two example makefiles: makefile.win creates the example package halconuser, both for standard HALCON and for HALCON XL. makefile_testprog.win creates the example applications based on the package halconuser, again for both HALCON versions. You start the making process by calling

  nmake -f makefile.win

and

  nmake -f makefile_testprog.win

from the root directory of the package. Both makefiles include the file make.%HALCONARCH%, which sets platform-dependent variables.

Both makefiles include the file make.dotnet, which sets variables for the C# compiler.

Note that you can create a debug version by calling the makefile as follows:

  nmake -f makefile.win STATE=debug

By default, a release version is created, which would correspond to calling nmake with STATE=release.

7.2.6.2   Generating Packages Under Linux

In order to activate a package, its complete path, e.g.

    $HALCONEXAMPLES/extension_package/halconuser

must be included in the environment variable HALCONEXTENSIONS. In the Linux version the package paths in HALCONEXTENSIONS are separated by colons. Please see also the comments on installing a HALCON package on a Linux system in section “Additional Information for Linux”.

The directory $HALCONEXAMPLES/extension_package/halconuser contains two example makefiles: makefile creates the example package halconuser, both for standard HALCON and for HALCON XL. makefile_testprog creates the example applications based on the package halconuser, again for both HALCON versions. Please note that the makefiles only work correctly with gmake! You must call gmake it from the root directory of the package.

Both makefiles include the file make.$HALCONARCH, which sets platform-dependent variables.

Note that the .NET assemblies are not automatically created by the makefiles. To create them, add dotnet to your call to make, e.g.,

  gmake -f makefile dotnet

Both makefiles include the file make.dotnet, which sets variables for the C# compiler.

Note that you can create a debug version by calling the makefile as follows:

  gmake -f makefile STATE=debug

By default, a release version is created, which would correspond to calling gmake with STATE=release.