养生 装修 购物 美食 感冒 便秘 营销 加盟 小吃 火锅 管理 创业 搭配 减肥 培训 旅游

在MicrosoftVisualStudio中运用Intel Fortran1

时间:2024-10-25 11:29:32

经常出现CompaqFortr瞢铍库祢an在win7下运行奔溃的情况。所以果断换为IntelVisualF泠贾高框ortran编译器。但是IntelFortran编译器必须在microsoftvisualstudio开发环境下才能用。所以在使用IntelFortran之前需先装好microsoftvisualstudio。装好之后,那么如何用IntelFortran进行编译运行。下面简单介绍在只有".for"文件和".dat"文件时的编译方法。

工具/原料

MicrosoftVisualStudio2012开发环境

IntelVisualFortran2013编译器

方法/步骤

1、打开软件VisualStudio2012,如下图:

在MicrosoftVisualStudio中运用Intel Fortran1

2、左键单击新建项目。如下图:

在MicrosoftVisualStudio中运用Intel Fortran1

3、新建项目Console2。新建工程觊皱筠桡Console2。具体方法如下:选择“模板/Intel(R)VisualFortran/Consol髫潋啜缅eApplication,如图中所标1,然后选择其中EmptyProject,如图中标注2。然后点击确定,如图中标注3。即可。图中五角星标注为项目Console工程Console2文件所在地。建立完成如下图2

在MicrosoftVisualStudio中运用Intel Fortran1

在MicrosoftVisualStudio中运用Intel Fortran1

4、把需要运行“.for”文件以及程序用到的“.dat”文竭惮蚕斗件放到默认文件夹"D/我的文档/Visual胨检馁秣Studio2012/Projects/Console2/Console2/"下(图中五角星标出来位置)。

在MicrosoftVisualStudio中运用Intel Fortran1

在MicrosoftVisualStudio中运用Intel Fortran1

5、打开工程Console2,如下图1,在工程Console2的下属文件夹SourceFiles那里右键,”添加/现有项目“,选中刚加进去的“.for文件”。

在MicrosoftVisualStudio中运用Intel Fortran1

在MicrosoftVisualStudio中运用Intel Fortran1

6、添加了“.for文件”后,如图。

在MicrosoftVisualStudio中运用Intel Fortran1

7、点击菜单栏里的“调试”/“启动调试”。即可。

在MicrosoftVisualStudio中运用Intel Fortran1

8、运行结果在默认文件夹"D/我的文档/VisualStudio2012/Projects/Console2/Console2/"中。

在MicrosoftVisualStudio中运用Intel Fortran1

© 一点知识