开发者

Can Fortran interact with Silverlight, WPF, or MFC on Windows?

I'd like to use Fortran to solve a numerical problem, but I'm not sure using a Fortran GUI library is the best choice to visu开发者_StackOverflow社区alize the results. How feasible is it to have a GUI in Silverlight, WPF, or maybe MFC and call code written in Fortran? Of course the Silverlight and/or WPF code would be written in a .NET language, and if I went with MFC it would be in C++.


Provided you use the standard Fortran means of making your subroutines that is usable via C, you should be able to use P/Invoke from C# to access and call them. With MFC, you could call the subroutines directly.

This will work for MFC and WPF (but not Silverlight). If you want to use this from Silverlight, you'll either need to wait for SL 5 (for P/Invoke support) or wrap the type in a COM library.


Alternatively to what Reed Copsey mentioned you can use Fortran compiler which can produce .NET assemblies. For example, Silverfrost FTN95.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜