I use “!DEC$ ATTRIBUTES STDCALL,REFERENCE,ALIAS:‘hello’, DLLEXPORT :: hello” for intel, so to enable using both you would need a macro like:
#ifdef __GNUC__
!GCC$ ATTRIBUTES DLLEXPORT :: hello
#else
!DEC$ ATTRIBUTES STDCALL,REFERENCE,ALIAS:'hello', DLLEXPORT :: hello
#endif
the directives should be OS agnostic