I have created a dynamic library that is using openmp. Whenever I want to use this lib I have to link with -fopenmp
, so gcc or clang links correctly.
Now, I want to call this lib via FFI, but I have no clue, how to pass this -fopenmp
-flag to ghc:
-L/usr/lib/gcc/--GCCVERSION--/ -lgomp.h
) the linking does not complain but it is not activating openmp and ignoring the parametersDoes anyone has any clue how to reenable the -fopenmp
Ok, I guess it is a simple naming problem:
gcc names it's openmp gomp
while clang calls it omp
.
So, I just had to change extra librarie toomp
and now, it is compiling.