C# calling Fortran Subroutine

C# calling Fortran Subroutine

Аватар пользователя Edward R.

 

Where is the documentation showing steps required to call a Fortran Subroutine from C#.

I am trying to import the Fortran Subroutine as follows:

        [DllImport ("WDSys.FortranCode.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]         private static extern void WDECONMATSOLV (ref int numRows, [In,Out] ref double[] matrixA, [In,Out] ref double[,] vectorB);

the start of the Fortran Subroutine is:

      Subroutine WDECONMATSOLV(n, a, b)

c     DEC$ATTRIBUTES DLLEXPORT::WDECONMATSOLV

       parameter (MNROW=30, MNCOL=15)

c

       double precision

      +a(MNROW,MNCOL) , b(MNROW)      , fact1         ,

If someone could tell me where the documentation is. That would help.  If the documentation isn't available how do you figure it out?

 

Ed Reyes
2 posts / 0 новое
Последнее сообщение
Пожалуйста, обратитесь к странице Уведомление об оптимизации для более подробной информации относительно производительности и оптимизации в программных продуктах компании Intel.
Аватар пользователя Tim Prince

You should consult the documentation on Fortran iso_c_binding, if C compatibility could do the job for you. Excellent stuff is on the web as well as in the ifort documentation. There has been some specific C# interface documentation in this forum as well as in the ifort help file.
another possible clue: much important on-line C# documentation is found under .Net rather than under C#.

Зарегистрируйтесь, чтобы оставить комментарий.