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:
- Go to Project Properties > Linker > Input.
- Add
vcomp.lib(or, for the debug configuration:vcompd.lib) to Ignore Specific Default Libraries. - Add
libiomp5md.libfrom%HALCONROOT%\lib\%HALCONARCH%to the Additional Dependencies.
For gcc and clang, add
-
-fopenmpto the compile flags, -
-L$HALCONROOT/lib/$HALCONARCH/thirdparty -liomp5to the linker flags.