Sujet : Re: how do you send a fortran character string from GCC to GFortran ?
De : tkoenig (at) *nospam* netcologne.de (Thomas Koenig)
Groupes : comp.lang.fortranDate : 02. Jan 2025, 11:06:59
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vl5og3$39nmu$2@dont-email.me>
References : 1
User-Agent : slrn/1.0.3 (Linux)
Lynn McGuire <
lynnmcguire5@gmail.com> schrieb:
How do you send a fortran character string from GCC to GFortran ?
>
I cannot get this to link. I can do the reverse, send a fortran
character string from Gfortran to GCC.
A full, self-contained example would be helpful for somebody trying to
help (especially since you say "link", which seems weird).
But take a look at
https://gcc.gnu.org/onlinedocs/gfortran/Naming-and-argument-passing-conventions.htmlI do have the additional complication that I do not know the length of
the fortran character string being sent from GCC to Gfortran at compile
time, only run time. So that is a character*(*) string.
>
I am not using the ISO C binding.
It is generally a good idea to use ISO C binding in new code, it
is what it was introduced for.
But you might also find
https://gcc.gnu.org/onlinedocs/gfortran/Interoperability-Options.htmlof interest.