Fortran symbols without underscores

Dear NVIDIA comunity,

I am trying to compile my fortran source code with nvfortran 21.9. I would like to have symbols in object files without trailing underscores, because I would like to link them against precompiled libraries without underscores. According to the documentation the correct flag to achieve this behaviour is -Miface=cref. Unfortunatelly, I have this error message:

nvfortran-Error-Unknown switch: -Miface=cref

Can you help me what I’m doing wrong?

“-Miface” was a Windows only flag from when we supported Windows. For Linux we don’t have a flag to remove underscores since it can cause collisions with the system’s C libraries.

The better way to do this is use the Fortran standard ISO_C_BINDING method by defining interfaces to those routines with a “BIND(C)” attribute.

1 Like