I have a C shared library used by IDL (on Linux). It gets compiled with:
make_dll,input_files,exported_routines,compile_directory=compilation_dir,EXTRA_CFLAGS="",EXTRA_LFLAGS="-flto"
I'm trying to use openmp in the code of the library. It works in tests compiled from C, but if I add -fopenmp to the EXTRA_CFLAGS, I get the following error when I try to run it from IDL:
/usr/local/exelis/idl83/bin/bin.linux.x86_64/idl: symbol lookup error: MyLib.so: undefined symbol: GOMP_parallel
So it's not linking to openmp, but adding -lgomp or -lomp doesn't link. What's the correct way to do this ?