Hi Steve, hi all,
it is so confusing what I find about mixing FORTRAN and C++
I have Visual Studio 2017 with Intel Parallel Studio XE 2018 and Microsoft Visual C++ 2017.
My FORTRAN-routine should call C++ routines. Can you tell me exactly how I can do that?
Thanks in advance!
Fortran interfaces well with C. To the extent that you can make C++ look like C, it works pretty well. For C++ functions you call, you must use the 'extern "C"'' prefix in C++. You will be restricted to argument types supported by both languages.
A complete worked example is "Fortran_Calls_C" in the Intel Parallel Studio XE for Windows Samples Bundle (under compiler_f\MixedLanguage).
See also https://software.intel.com/en-us/blogs/2012/05/11/doctor-fortran-in-i-can-c-clearly-now-part-i - sadly, I never got around to writing Part II.