Visual Studio and FORTRAN working together?

18,550

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.

Share:
18,550

Related videos on Youtube

Alex Hope O'Connor
Author by

Alex Hope O'Connor

Software Engineer working for DSITIA in Brisbane Australia.

Updated on June 04, 2022

Comments

  • Alex Hope O'Connor
    Alex Hope O'Connor almost 2 years

    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?

    Thanks, Alex.

  • Alex Hope O'Connor
    Alex Hope O'Connor about 13 years
    The input files are over-complex and cumbersome, we also want to be able to bring in multiple data sources, which would have to be supported in the console application as well then. We will also simply write a extension on our GUI application which will allow for batch scripting with input files.

Related