Software Archive
Read-only legacy content
17061 Discussions

Sharing data between C++ and Fortran

Intel_C_Intel
Employee
293 Views
I'm trying to use Fortran commons and C++ structures. All the examples show (and talk about) sharing data with C. I'm having trouble using the C++. It looks like the C++ adds a "decoration" to the variable names, etc. What do I need to do to share the data??
0 Kudos
1 Reply
Steven_L_Intel1
Employee
293 Views
Same as for routines - use:

extern "C"

in the data declaration, or figure out the name mangling and specify it as an alias in the Fortran code.

Steve
0 Kudos
Reply