开发者

Visual Studio and FORTRAN working together?

开发者 https://www.devze.com 2023-02-23 05:43 出处:网络
I have recently started working on a project which is basically a GUI for a FORTRAN console application which runs a series of simulations on a data set.

I have recently started working on a project which is basically a GUI for a FORTRAN console application which runs a series of simulations on a data set.

What I want to do is be able to modify this FORTRAN code and compile it as a .dll so I can pass the data to it directly through a DLL import sort of thing.

So I was wondering, can you set up a FORTRAN project in Visual Studio 2010? As in being able to compile and debug the code?

And is there anything negatives associated with making direct calls to compiled FORTRAN .dll file? Such as limited paramater data types/return data types?

Th开发者_运维问答anks, Alex.


So I was wondering, can you set up a FORTRAN project in Visual Studio 2010? As in being able to compile and debug the code?

Yes, you can. But I think you need to buy a commercial compiler with integration to VS.

I know at least 3 options. Intel® Fortran Composer and PGI Visual Fortran® can produce native code and Silverfrost FTN95 can produce .NET assemblies (it supports .NET 4.0).

And is there anything negatives associated with making direct calls to compiled FORTRAN .dll file? Such as limited paramater data types/return data types?

But if you already have console application than I actually recommend keep it like it is. Don't create DLL, just write you GUI application as a kind of front-end for your console back-end. You GUI front-end should be able to generate input files and analyze output files.

From my point of view this way is much more flexible. In the future you can easily use you console back-end on *nix cluster, for example. Or some experienced users can use scripting around console back-end...

You can also make it possible for user to submit this generated input file to the console back-end (creating a new process) from your GUI app. GUI app will wait for process to finish and then analyze output. But such tight integration of back-end and front-end is not necessary.

0

精彩评论

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

关注公众号