7.7   Creating an Executable Under macOS

Your own C++ programs that use HALCON operators must include the file HalconCpp.h, which contains all user-relevant definitions of the HALCON system and the declarations necessary for the C++ interface. Do this by adding the following command near the top of your C++ file:

  #include <HALCONCpp/HalconCpp.h>

Using this syntax, the compiler looks for HalconCpp.h in the HALCONCpp framework. For HALCON XL the include statement has to be adapted:

  #include <HALCONCppxl/HalconCpp.h>

To create an application, you have to link the framework HALCONCpp to your program.

HALCON XL applications: If you want to use HALCON XL, link the library framework HALCONCppxl instead.

For more information about suitable project settings, take a look at the example Xcode projects under /Users/Shared/Library/Application Support/HALCON-21.05/examples/cpp.