Pass arrays from C/C++ to Fortran and return a calculated array
I am trying to pass an array from C/C++ into a Fortran 2003 module and get the calculated values back into C/C++. I've been able to pass and return single values (scalars) just fine, but getting an array back and forth is proving difficult. I've found many threads on scalar values and I've been successful at making those work. I've modeled my array based functions after my working scalar functions. I am using gcc/gfortran. Here's the Fortran module (ConvertUnitsLib.f03). module ConvertUnitsLib use :: iso_c_binding ! for C/C++ interop real(c_double), bind(c) :: degF, degC public DegCtoF