Is there a way to link PGI Compiler binaries to existing GNU binaries? When I try to link I get following error:
oacc.c.o:(.init+0x8): undefined reference to `__pgio_ini'
collect2: ld returned 1 exit status
Details:
I have compiled a few files with gcc and g++. The C main
function is included in these files. Now I should add a OpenACC function to project which must be compiled by PGI C Compiler (pgcc
). After compile, I get the above link error (the error is the same for both pgCC
or g++
as linker).
Maybe I need to integrate the OpenACC function into a dummy library and include/link it to the project. But I have no idea how to do that.
Unfortunately, entire project cannot be compiled with PGI Compiler, since some functions depend on GNU Compiler.
Thanks in advance.