Search code examples
c#c++visual-studio-2013fortranintel-fortran

How can I use a Fortran file in a C# application?


I have Intel® Parallel Studio XE, which offer a Fortran compiler for Microsoft Visual Studio (I use the 2013 Ultimate version). It is possible to execute a Fortran file in a C# application or it must be a C/C++ application? How can I do it?


Solution

  • None of them can use fortran, you must create a fortran project, you can't mix languages. A possible solution is to create a DLL and interface it with DLLImport, this may help you:

    https://sukhbinder.wordpress.com/2011/04/14/how-to-create-fortran-dll-in-visual-studio-with-intel-fortran-compiler/