Can C++ program access data in allocatable array defined in Fortran Module? My C++ program can access scalar values defined in Fortran module, but got error "symbol not found" when tried to access fixed-size & dynamic arrays. Please help!
This is an interesting question, and I haven't seen a full answer to it. You are more likely to get that answer on the Fortran linux forum.
Legacy programs are likely to use the Cray pointer facility for dynamic arrays to be shared between C++ and Fortran, but I certainly don't advocate that. Fixed size single subscripted Fortran arrays are seen in C as a pointer to the first element of the array. When you say "symbol not found," do you mean a link error?
"Symbol ... not found" was shown when I ran debugger. I made some progress after I posted my question yesterday. Now my C++ program can access scalar data, data of fixed-size arrays. But it still cann't access data of dynamic arrays, meaning values are worng.