Visual Studio和FORTRAN一起工作? [英] Visual Studio and FORTRAN working together?

查看:283
本文介绍了Visual Studio和FORTRAN一起工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近开始工作的一个项目,该项目基本上是一个图形用户界面运行在一个数据集的一系列模拟一个FORTRAN控制台应用程序。

我想要做的是能够修改这个FORTRAN code并将其编译为一个.dll这样我就可以直接通过DLL导入类的事情传递数据给它。

所以我想知道,你能不能建立在Visual Studio 2010中一个FORTRAN项目?由于在能够编译和调试code?

和是否有与直​​接调用FORTRAN编译.dll文件相关联的任何负面?如限制paramater数据类型/返回数据类型?

谢谢, 亚历克斯。

解决方案
  

所以我想知道,你能不能建立在Visual Studio 2010中一个FORTRAN项目?由于在能够编译和调试code?

是的,你可以。但我认为你需要购买一个商业编译器集成到VS.

我知道至少有3个选项。 英特尔®Fortran作曲家和的 PGI视觉Fortran®能产生天然code和 Silverfrost FTN95 可以产生.NET程序集(支持.NET 4.0)。

  

和是否有与直​​接调用FORTRAN编译.dll文件相关联的任何负面?如限制paramater数据类型/返回数据类型?

但是,如果你已经有了控制台应用程序比我实际建议保持它喜欢它。不要创建DLL,只写你的GUI应用程序作为一种前端控制台后端。你GUI前端应当能够产生输入文件和分析输出文件。

从我的角度来看这种方式更加灵活。在未来,你可以很容易地使用你安慰* nix的集群后端,例如。或者一些有经验的用户可以使用脚本各地控制台后端...

您也可以,这使用户能够从你的GUI应用程序提交此产生的输入文件到控制台后端(创建一个新的进程)。 GUI应用程序将等待进程结束,然后分析输出。但是这种紧密的后端和前端的集成是没有必要的。

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.

解决方案

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.

这篇关于Visual Studio和FORTRAN一起工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆