Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

IVF and C#

klaus_knebel
Einsteiger
1.091Aufrufe
Hello
I have a very basic question.
Is it possible to mix code IVFortran and C# ?
I need to call some small code which is written in C# from my Fortran program.
A colleague of mine tells me, that this is not possible because C# uses .Net and IVF cannot do .NET ?
Any information on this ?
Klaus

0 Kudos
3 Antworten
TimP
Geehrter Beitragender III
1.091Aufrufe
It depends on what you mean by mixing. Fortran falls in the unmanaged code category (unless you use one of the compilers from other vendors which could generate managed code). Steve posted examples on this forum of how to combine managed code with unmanaged Fortran.
Managed Fortran never achieved much popularity; it was done in order to integrate with .NET debugging and profiling.
klaus_knebel
Einsteiger
1.091Aufrufe
Thank you.
I found the old thread from Steve about managed code.
Well, looks like it is not easy to do.
I wanted to call some 'simple' funktion which my colleague wrote in C#, not much of data transfer, just some numbers.
I was hoping, that he could make a DLL or lib and I can attached this to my fortran code.
Klaus


Steven_L_Intel1
Mitarbeiter
1.091Aufrufe
If he can create a DLL, then you probably can call it by using the "Fortran Module Wizard" tool. I don't know C# so can't easily come up with an example to try.
Antworten