0

In a shared object, I can make my Fortran routines unavailable from outside using -fvisibility=hidden.

In C/C++ you can override this setting in your routines by void __attribute__ ((visibility("default"))) x () {...} as described here: http://portal.nacad.ufrj.br/online/intel/compiler_c/common/core/GUID-091C387B-E637-4115-BFC9-1874DD56F50E.htm

Is there a similar way to override the setting in Intel Fortran, such that I can decide which modules or routines in the shared object that can be called from the outside

3
  • Or do you want something similar to the DLLEXPORT attribute in Intel Fortran for Windows? That means control which symbols are exported into a shared library? Commented Mar 1, 2023 at 10:06
  • Yes something like DLLEXPORT on windows. Commented Mar 1, 2023 at 10:28
  • 1
    I do not think it is possible, the relevant attributes are Windows and MacOS only. But you can also ask at the Intel forum directly. This is certainly a compiler-specific issue, the Fortran standard does not touch this. Commented Mar 1, 2023 at 12:37

0

Browse other questions tagged or ask your own question.