I am currently working on a C code, trying to make use of the offload mode. The code uses a configure script that creates a static library, which is used by a file containing '#pragma offload' as well. When I simply try to configure and build (I'm using export CC="icc -openmp") I get an error "undefined reference to '__offload_target_acquire'" and '__offload_offload'. I've tried using xiar, but that doesn't change anything.
I have also tried to link dynamically to liboffload.so.5 as a last resort. The build is successful, but then I receive an error: "cannot find offload entry __offload_entry_..." when trying to run the executable.
I would like to know what is the process when dealing with configure scripts and offload mode. Are there any compiler flags that can be used to resolve the problem with libraries, or is the error lying on the configure script side and it has to be modified or rewritten?