There are several working examples of how to use the enhanced interoperability features with C introduced in Fortran 2018 on other Fortran forums:
There are several working examples of how to use the enhanced interoperability features with C introduced in Fortran 2018 on other Fortran forums: