Skip to content

Using HALCON with OpenMP🔗

Using different OpenMP runtimes in a single program leads to undefined behavior. Thus, if you have an application using HALCON and OpenMP, meaning your application uses the halcondl library and OpenMP, you have to link against the Intel OpenMP library libiomp5. libiomp5 is installed with HALCON.

The necessary steps depend on your platform.

In Visual Studio, do the following:

  1. Go to Project Properties > Linker > Input.
  2. Add vcomp.lib (or, for the debug configuration: vcompd.lib) to Ignore Specific Default Libraries.
  3. Add libiomp5md.lib from %HALCONROOT%\lib\%HALCONARCH% to the Additional Dependencies.

For gcc and clang, add

  • -fopenmp to the compile flags,

  • -L$HALCONROOT/lib/$HALCONARCH/thirdparty -liomp5 to the linker flags.