Deutsch   English   Français   Italiano  
<vl5og3$39nmu$2@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.misty.com!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Thomas Koenig <tkoenig@netcologne.de>
Newsgroups: comp.lang.fortran
Subject: Re: how do you send a fortran character string from GCC to GFortran ?
Date: Thu, 2 Jan 2025 10:06:59 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <vl5og3$39nmu$2@dont-email.me>
References: <vl5ima$38li7$1@dont-email.me>
Injection-Date: Thu, 02 Jan 2025 11:07:00 +0100 (CET)
Injection-Info: dont-email.me; posting-host="74bdbf1cea330ee16c71c1dd3ed0b6c6";
	logging-data="3464926"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18IZilc5iN3PB5de+neeOc2ikn7yCGLazQ="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:/hDcoL1aehuzk3Uzut6RMMk7zIY=
Bytes: 1884

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.html

> I 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.html

of interest.