Windows 下运行Fortran程序

Windows 下运行Fortran 程序
准备工作:
1.先安装Inter Visual Fortran (Fortran编译器,我用的是2013版),安装过程较慢。

2.再安装Visual Studio 2008 (微软开发的程序集,我用的是2008版),软件较大,安
装过程较慢。

3.以上两者必须要匹配(匹配图如下),安装顺序一定是先IVF,后VS,不然无法把Fortran
编译器集成到Visual Studio 里。

以上工作完成后就可以进入正题啦:
1.打开Visual Studio 2008,界面如下
2.文件——新建——项目
3.保存项目后,界面右边出现文件树:
4.新建一个Fortran文档(文件——新建——文件),选自由格式就好。

5.在新建的文档里编写程序,运行,再保存,我新建的文档名字为Source2(“调试”
菜单下有个“开始执行”按钮)。

PS:程序有问题的话就要修改好,直到没有问题。

6.保存Source2 (记住保存的位置)之后,把其添加到Source File 的目录下(右键
——添加——现有项)
7.添加成功后,则有
8.再对Source2.f90(即Source2)进行编译
9.执行没问题后就能产生你所编写的东西,我这里是生成了一个2.dat的文件,即打
开项目(Console2)里Console2即可查看。

以上就是Windows 下运行Fortran 程序的全部内容(当然还有其他形式实现)。

本人找了很久的资料才整理出来的,希望能帮助到各位。

若其中遇到任何问题请联系QQ:2509725265 备注写上Fortran 即可。

合集下载

win7-32位系统下abaqus6.9安装intel visual fortran11历程和setenv调用故障的解决

win7-32位系统下abaqus6.9安装intel visual fortran11历程和setenv调用故障的解决

win7-32位系统下abaqus6.9安装intel visual fortran11历程和setenv调用故障的解决2013-04-04 21:52:44| 分类:默认分类| 标签:|字号大中小订阅本人菜鸟一枚。

由于要学习abaqus的子程序使用方法,所以要在电脑上安装ivf(intel visual fortran)才行。

根据网上的教程,我鼓捣了三四天才顺利装上。

其间遇到了一些问题,网上很难找到答案。

为了避免大家再受到相同的折磨,现将安装日志记录如下。

1. 需要的软件。

abaqus的子程序是用fortran语言编写的,要调用必须安装ivf。

但是ivf只有程序编译功能(胡乱解释),需要依靠microsoft visual studio软件进行连接。

所以要首先安装vs(visual studio)。

2.软件版本。

win7-32位系统,abaqus6.9(版本较老,懒得换)。

vs2008中文版(有的网友说中文版的不行,但是我的经历证明是可以的)需要在ivf之前安装,abaqus安装次序无所谓。

ivf11.1.038版本,必须在vs2008之后安装。

3.设置。

网上有两种方法,一种需要改环境变量,另一种不需要,本人较驽钝,选第二种。

打开abaqus安装文件夹C:\SIMULIA\Abaqus\Commands(看自己的安装路径了),找到abq691.bat 文件,右键选择“编辑”。

在原有文字之前加上@call "C:\Program Files\Intel\Compiler\11.1\038\bin\ia32\ifortvars_ia32.bat",包括引号在内哦。

4.开始菜单——〉所有程序——〉abaqus6.9——〉abaqus verification,进行安装验证,完成后会自动生成并打开验证结果文件,各项都是“PASS”,表示安装成功。

5.经验教训。

软件版本不对是不行的。

第三章 Fortran基础、输入输出

第三章 Fortran基础、输入输出

第三章 Fortran程序设计基础、 输入输出及声明
二、Fortran的数据类型和数学表达式 1. Fortran的数据类型 (2)浮点数(Real) 浮点数的类型又分两种,单精度型和双精度型。 在个人计算 机中占用 有效位数 可记录的 最大数值 最小数值
单精度
双精度
32bits (4bytes) 64bits (8bytes)
Fortran是不区分大小写的语言。 指变量名和执行命令不区分,字符串是区分大小写的。
第三章 Fortran程序设计基础、 输入输出及声明
一、字符集和书面格式 2. 书面格式
Free Format(自由格式)
Fortran程序代码为以*.F90为扩展名的文件
Fixed Format(固定格式) Fortran程序代码扩展名为*.F或*.FOR的文件
使用2个bytes来存放整数的意思。
若在声明时没有特别赋值长短,通常编译器会默认使用长整型。
第三章 Fortran程序设计基础、 输入输出及声明
四、声明
1. 整数类型
若声明多个整型变量时,可以写在同一行,如 integer a,b,c 在Fortran中,声明变量时要注意的几个原则: (1)变量的名称以使用英文字母为原则,可以内含下划线或数字,但前缀必须 是英文字母。 (2)变量名字的长度,在77标准中最起码支持6个字符长,90标准中最起码支 持31个字符长。也就是说在Fortran77种变量长度最好是在1~6之间,在
1. 乘幂要连用两个星号,不能像手写的时候只要把数字写成上标 就行了,例如22必须写成2**2。 2. 乘号不能省略,手写的算式中(A+B)(C+D)和(A+B)*(C+D)是一 样的,但写程序时只容许第2种写法,所以像2*A也不能写成2A。 3. 除法用计算编写时没有下面的表示方法:

Installing the IMSL Fortran Windows

Installing the IMSL Fortran Windows

IMSL Fortran 程序库Windows 版安装与使用说明安装IMSL Fortran数值程序库1. 执行安装程序放入光盘片后,安装程序将会自动执行。

如果您插入光盘片后无法自动启动安装程序,您可于光盘片中直接执行setup.exe 安装程序。

如果您使用Intel Visual Fortran Compiler 8.0 专业版请在光盘IMSL目录下执行setup.exe。

2. 欢迎窗口第一个窗口显示IMSL Fortran数值程序库安装精灵程序。

请点选Next按键以启动安装程序。

3. 授权合约此窗口显示使用者授权合约。

当您阅读完内容并且同意此合约请按Yes继续下一步。

4. 安装系统此窗口允许您选择所需安装的IMSL Frotran 数值程序库于IA-32或Itanium(可复选)后按Next 继续下一步。

5. 安装目录设定IMSL Fortran数值程序库安装目录,预设为C:\Program Files\VNI\CTT5.0。

您可使用Browse按键修改,若该目录不存在,您将被建议建立该目录,同意后按Next继续下一步。

6. 安装进度在安装过程中将会实时更新目前安装进度。

7. 环境变量设定通常设定自动更新IMSL Fortran数值程序库所需环境变量,我们建议您按Yes。

8. 安装完成当安装完成后,您将会被通知,按Finish 结束安装精灵程序。

IMSL Fortran数值程序库授权码设定以下将依照您所选择安装的目的进行,并非所有的步骤都是必须的。

∙Intel Visual Fortran Compiler, 专业版已设定好授权码请直接跳至步骤7。

∙试用版本:请输入试用授权码,依照步骤1 与3 设定。

∙无限使用版:无限制使用者个数授权码,请依照步骤1 至3 设定。

∙个人使用:单机版或网络版授权码,请依照步骤1 至6 设定。

1. 设定环境变量设定LM_LICENSE_FILE 环境变量安装授权档案。

熟悉FORTRAN95软件开发环境

熟悉FORTRAN95软件开发环境

实验一熟悉FORTRAN95软件开发环境一、实验目的1. 熟悉Compaq Visual Fortran 6.6的集成开发环境。

2. 掌握Fortran程序的上机步骤。

3. 掌握Fortran程序的结构、书写规则。

二、实验内容1. P11 例1.10 输入圆的半径,计算圆周长与面积的程序。

操作步骤:(1)启动Compaq Visual Fortran 6.6 的Developer Studio,进入Compaq Visual Fortran 6.6的集成开发环境(C:\ ... Fortran \ BIN \ MSDEV.EXE)。

(2)从File菜单中选择New菜单项,在弹出的对话框中选取Projects,Project Name栏内填入项目名称(输入LAB01),在Projects选择Fortran Console Application, Location内选择保存位置(自己的文件夹),单击OK按钮。

(3)选择Standard工具栏的新建按钮(或File—>New—>Files—>Fortran Free Format Source file),在文本编辑区输入以下程序代码:(以!开始的内容用于对程序进行注解说明)输入完毕,以EX101.F90为文件名保存源程序。

(4) 选择Project菜单中的Add to Project, 再选files,向项目工作间内添加该文件。

(5)按Ctrl+F7,再按F7,对项目进行编译和连接,如果有错误,根据提示修改错误;编译无错误,则会生成扩展名为.exe的文件。

(6) 按Ctrl+F5, 程序开始运行,屏幕提示输入R的值,这时输入:50 回车观察屏幕显示运行结果。

(7) 生成“Win32 Release”版(发布版)可执行程序:“Build”—> “Batch Build…”(8) 在Windows操作系统下运行可执行程序:打开Windows资源管理器,进入F:\Lab01\Release 文件夹,双击“Lab01.exe”程序文件。

visual studio fortran mpi用法

visual studio fortran mpi用法

在 Visual Studio 中使用 Fortran 和 MPI(Message Passing Interface)进行并行编程,可以通过以下步骤:1. 安装 Visual Studio:首先,确保已安装 Visual Studio。

您可以从 Microsoft 官方网站上下载适用于 Fortran 开发的 Visual Studio 版本。

2. 安装 Intel Fortran Compiler:如果您计划使用 Intel Fortran 编译器进行开发,需要安装 Intel Parallel Studio XE,其中包含了 Intel Fortran Compiler。

3. 创建 Fortran 项目:在 Visual Studio 中,选择 "创建新项目",然后选择 "Fortran" 类型的项目。

4. 配置项目属性:在项目属性中,设置编译器选项和链接器选项,以及其他项目设置。

例如,设置编译器为 Intel Fortran Compiler。

5. 编写 Fortran 代码:编写您的 Fortran 代码,可以使用 Fortran 90/95/2003/2008 的语法。

6. 添加 MPI 支持:在 Fortran 代码中,使用 MPI 库函数进行并行编程。

您需要添加MPI 头文件和库文件的路径,以便编译和链接 MPI 相关代码。

MPI 头文件通常位于MPI 安装目录的 include 文件夹下,而库文件则位于 lib(Windows)或 lib64(Linux)文件夹下。

7. 构建和运行:构建项目并运行生成的可执行文件。

在运行 MPI 程序时,您可能需要在启动命令中指定使用的进程数(例如,mpiexec -n 4)。

这些步骤提供了一个基本的框架,让您可以在 Visual Studio 中进行 Fortran 和 MPI 的并行编程。

根据您的具体需求和环境,可能还需要进行一些其他的配置和设置。

Compaq Visual Fortran 安装和使用说明(新手必读)

Compaq Visual Fortran 安装和使用说明(新手必读)

Compaq Visual Fortran 6.6使用说明首先要安装Compaq Visual Fortran6.6程序。

如果在安装过程刚开始就不成功,那就是系统问题,可能缺少某些组件。

但是不需要安装Visual studio也能使用。

我是通过重新安装win7系统解决。

当软件安装好之后,在开始菜单左单击Developer Studio 或者双击桌面打开之后如下图:这个对话框是让你了解本软件的一些信息可以选择”Close”。

点击“File”“New”会出现以下情况并选择“Fortran Fixed Format Source File”,可以双击打开,也可以在右边的“File”对话框随便写个字母或者数字,然后点击“OK”进入下面这个界面编辑框中的绿色竖线是第六列,是续行标志区,前面的五列是表示标号区。

且第一行是注释行,并以”C”或者“*”开头。

从第二行,第六列之后(绿色线后)开始编辑程序。

蓝色箭头是三个重要的按钮。

编辑连接运行左单击“Compile ”会出现以下情况,直接点击“运行程序”就可以。

在下面的界面会显示你程序的错误和警告。

如果有错误,双击下面的错误提示,就会在程序编辑框内显示错误所处的位置,编辑框左边蓝色横线。

根据提示进行修改。

如下图发现有0个error和0个warning。

说明程序是对的。

然后点击后面的“build”连接按钮。

会出现前面一样的提示,也是选择运行程序。

最后点击红色叹号“运行”按钮。

也是选择运行程序。

运行结果就会出来。

应特别注意,由于win7的兼容性,一次打开程序只能编辑一次程序。

也就是说,编辑一个程序就要关闭之前的程序并重新打开程序。

如果关闭的只是编辑框,当你编辑下一个程序并“Build”时,会出现上一个程序的错误和警告。

本文编辑仓促,需要有不详细的地方,请参考其他参考文章。

Fortran入门:Windows平台的Fortran编译器安装和使用

Fortran⼊门:Windows平台的Fortran编译器安装和使⽤因为课程需要,今年开始学习FORTRAN语⾔。

之前学校的计算概论⽤的是C,后来⼜学了C++和Python作为⾯向对象的⼯具,数值计算⽅⾯主要通过学校的许可证⽤的MATLAB。

因为专业侧重数值模拟和反演问题,对于FORTRAN这⼀门上古的数值计算语⾔早有⽿闻,在学习Scientific Computing的时候也经常讲到⼀些原本是基于FORTRAN优化的⼦程序和底层设计模块。

上⽹查了⼀下,FORTRAN的社区⾮常少,⽽且可能是因为使⽤者都已经是富有经验的程序设计者,⾃学⼊门的新⼿不多,很多地⽅还是需要⾃⼰摸索,就决定索性在博客上记录⼀下摸索的过程。

FORTRAN,原意为Formula Translation(公式翻译器),是出现很早的⼀门⾼级语⾔。

FORTRAN的主要⾯向科学计算、数值计算,虽然在FORTRAN-2003版本中逐渐引⼊了更加丰富的⾯向对象(Object Oriented)设计思维,但是其主要的功能仍然是数值计算领域;某种意义上,使⽤FORTRAN的⼈⼀般不需要过于复杂的⾯向对象策略,需要使⽤复杂完整的⾯向对象策略的⼈也并不会选择FORTRAN。

最近还发现⾮常⾟酸的⼀点,CNBlogs上的代码插⼊不⽀持Fortran的语法⾼亮,也没有找到⽀持的插件。

⼀. FORTRAN 编译器的安装查了⼀下,⽬前相对常见的Fortran编译器版本是Fortran77或者Fortran90/95,进⼊新世纪的修正版本Fortran2003反⽽⽤的⽐较少。

流⾏的免费FORTRAN编译器实现⽅案包括GCC的GFortran,Intel的Intel Fortran Compiler等。

我这⾥使⽤的是G95,是GFortran对应Fortran95的⼀款编译器。

Windows系统上如果已经安装了MinGW体系(如果你使⽤过gcc的C语⾔或者C++编译器,⼀般都已经装了),那么⼀个.exe ⽂件就可以帮忙搞定安装G95的全部操作!⾮常⽅便!g95 --version然后cmd会返回⼀个G95的版本信息,如下所⽰。

windows f2py 调用fortran 代码

在Windows系统中,你可以使用f2py工具调用Fortran代码。

f2py 是一个Python的Fortran编译工具,可以将Fortran源代码编译为Python可调用的共享库。

以下是在Windows系统中使用f2py调用Fortran代码的基本步骤:
1. 安装Python和NumPy
在使用f2py之前,你需要先安装Python和NumPy。

你可以从Python官网下载并安装Python,然后使用pip安装NumPy。

2. 安装f2py
你可以使用pip安装f2py。

打开命令提示符,输入以下命令:
```shell
pip install numpy-f2py
```
3. 编写Fortran源代码
创建一个Fortran源代码文件(例如:hello.f90),其中包含你想
要调用的Fortran函数或子程序。

4. 使用f2py编译Fortran源代码
打开命令提示符,进入Fortran源代码所在的目录,输入以下命令来编译源代码:
```python
f2py -c -m hello hello.f90
```
这将生成一个名为“hello”的共享库文件(.dll文件)。

5. 在Python中调用Fortran函数
现在你可以在Python中导入生成的共享库文件并调用Fortran函数。

例如:
```python
import hello
hello.say_hello()
```
这将调用Fortran源代码中定义的say_hello函数。

图文解说教你如何下载并安装IVF 2011和VS 2010

图文解说教你如何下载并安装IVF 2011和VS 20100概述本文采用图文并茂的形式力图让读者尤其是新手能够快速的成功安装并运行Fortran程序,避免走弯路,让读者把更多的精力放在写程序本身而非其下载和安装上。

本文主要分为三大部分,分别是源程序的下载、安装和运行第一个程序。

两大主要的原安装包分别为Microsoft Visual Studio 2010(2.5G)和Intel Visual Fortran Composer XE 2011.5.221 Windows(500M),读者最好能够提前获得。

此外安装过程比较耗时,要有充分的准备。

安装过程必须为先Microsoft Visual Studio后Intel Visual Fortran Composer。

Microsoft Visual Studio 2005和2008会与office 2007组件冲突,对系统的要求非常严格,导致Intel Visual Fortran Composer XE 2011.5.221 Windows安装失败。

具体的情况请查阅网上相关信息。

Compaq Visual Fortran 6.5/6.6也是很好的Fortran编辑器,大小365M,不需要而外安装Microsoft Visual Studio。

但是被Intel收购后不再更新,与新生的win7存在兼容性问题。

在Xp上运行良好。

Fortran PoweStation4.0小巧轻便,网友说可以兼容win7。

也是不错的选择。

声明:全文独立完成,并在本机完全实现:32位操作系统使用win7专业版,且已安装Office 2007。

并未测试XP/64位是否可用,仅供参考。

备注:2010-07-18:初稿完成,格式编辑完毕。

1 Microsoft Visual Studio 20101.1 下载1.1.1 搜索全名Microsoft Visual Studio 2010旗舰版(VS2010中文版下载)官方中文版1.1.2下载地址/html/4614.html,大小2.5G。

Fortran运行中给出的系统错误及解决方法

. Fortran 运行中给出的系统错误及解决方法以下均为linker tools errors and warningsLinker Tools Error LNK1000unknown error; consult documentation for technical support options Note the circumstances of the error, try to isolate the problem and create a reproducible test case, then contact technical support.Linker Tools Error LNK1101incorrect MSPDBxx.DLL version; recheck installation of this product The version of MSPDBxx.DLL available on your system does not match the version required by this tool.Linker Tools Error LNK1102out of memoryThere was not enough memory for the tool to run. Probably the paging file exceeded available disk space. If a shortage of disk space is not the cause, note the circumstances of the error, try to isolate the problem and create a reproducible test case, then request technical support.Linker Tools Error LNK1103debugging information corrupt; recompile moduleProbably the compilation was terminated before a valid object file was created.Recompile the given object file. If recompiling does not correct the problem,note the circumstances of the error, try to isolate the problem and create a reproducible test case, then consult technical support.Linker Tools Error LNK1104cannot open file "filename"The tool could not open the given file. One of the following may be a cause:l There was not enough disk space.l The file does not exist.l The filename or its path was incorrectly specified.l The specified drive is invalid.l The file does not have the appropriate permissions.l The path for filename expands to more than 260 characters.l If the given file is named LNKn, which is a filename generated by the linker for a temporary file, then the directory specified in the TMP environment variable may not exist, or more than one directory is specified for the TMP environment variable. (Only one directory path should be specified for the TMP environment variable.)l If the error occurs on the executable filename, an earlier version of the executable may still be running. You will need to terminate the executable before linking it. In Windows NT (including Windows 2000) or Windows 95,you can use the utility PVIEW to look for and kill instances of the application.l If the error message occurs for a library name, and you recently ported the .MAK file from a previous Microsoft Visual C++ developmentLinker Tools Messages Page 3 of 37environment, the library may no longer be valid. Ensure that the library still exists in this circumstance.l If the error message occurs for a library name such as CONSOLE.LIB, and you included object modules from an older Fortran developmentenvironment such as Microsoft Fortran PowerStation, recompile all source files with Visual Fortran to create new object files and libraries.Linker Tools Error LNK1105cannot close file "filename"The tool could not close the given file. Possibly there was insufficient disk space available.Linker Tools Error LNK1106invalid file or disk full: cannot seek to locationThe tool could not read or write to location in a memory-mapped file:l Your disk may be too full to complete the link. Free up some space and try the link again.l The error may be a result of trying to link over a network. Some networks do not fully support the memory-mapped files used by the linker. Try linking on your local disk to see if that fixes the problem.l There may be a bad block on your disk. Although the operating system and disk hardware should have detected such an error, you may want to run a disk checking program.Linker Tools Error LNK1107invalid or corrupt file: cannot read at locationThe tool could not read the file. Recreate the file.Linker Tools Error LNK1108cannot write file at locationThe tool could not write to the file. One of the following may be a cause:l There was not enough disk space to create the file.l The drive being written to was not available, possibly due to a network problem.Linker Tools Error LNK1109cannot remove file "filename"LIB could not delete the given file. Before LIB writes the new version of a library, it removes the existing library file. One of the following may be a cause:l The given file does not have the appropriate permissions.l The drive containing the file was not available, possibly due to a network problem.Linker Tools Error LNK1110Linker Tools Messages Page 4 of 37cannot rename file "filename"LIB could not rename the given file. When LIB builds a new version of a library, it creates atemporary file, then renames the file. One of the following may be a cause:l The given file does not have the appropriate permissions.l The drive containing the file was not available, possibly due to a network problem.Linker Tools Error LNK1111invalid /BASE argument "argument"The /BASE option was incorrectly specified. Either no argument was specified or argument is not a number.Linker Tools Error LNK1112module machine type "type1" conflicts with target machine type "type2"The object files specified as input were compiled for different machine types.Linker Tools Error LNK1113invalid machine typeThe machine type specified in the object header is not valid. Probably the file is corrupt. Rebuild the object. See Corrupt Object File for more information.Linker Tools Error LNK1115/MACHINE option requiredLINK or LIB cannot determine the machine type for objects that are provided entirely from libraries. Either specify the /MACHINE option with the appropriate machine type or specify at least one object file in the input.Linker Tools Error LNK1117syntax error in option "option"The given option was not correctly specified.Linker Tools Error LNK1118syntax error in keyword statementThe given module-definition statement was not correctly specified.Linker Tools Error LNK1119invalid ordinal number "argument"The argument following the at sign (@) in an ordinal specification was not avalid number. An ordinal number is an optional argument in either an /EXPORToption in a LINK or LIB command or an EXPORTS statement in a moduledefinitionfile. It is an index into the exports table. The number must be aninteger in the range 1-65535.Linker Tools Error LNK1120number unresolved externalsLinker Tools Messages Page 5 of 37Error LNK1120 gives you a count (number) of unresolved externals for this link.The conditions that cause unresolved externals are described with errorLNK2001 (see Linker Errors LNK2001 to LNK2014), which precedes this error message (once for each unresolved external).Linker Tools Error LNK1121duplicate ordinal number "number"The given ordinal number was specified more than once in either an /EXPORT option in a LINK or LIB command or an EXPORTS statement in a moduledefinition file. Ordinal numbers must be unique integers in the range 1-65535.Linker Tools Error LNK1123failure during conversion to COFF: file invalid or corruptThe object or resource could not be converted to COFF. This tool requires the format of all input files to be COFF. If an input file is not COFF, the tool runs a conversion tool, either CVTOMF (to convert 32-bit OMF objects) or CVTRES (to convert resource files). This error is preceded by errors or warnings from the conversion tool. One of the following may be a cause:l The file is corrupt.l The file is not a valid file type. An example of an invalid type is a 16-bit OMF object.Linker Tools Error LNK1127library is corruptThe library file is corrupt. Rebuild the library.Linker Tools Error LNK1129cannot find resolution for weak extern symbolThe given weak external symbol does not have a default resolution. Probablythe symbol table is corrupt. Rebuild the object file. See Corrupt Object File for more information.Linker Tools Error LNK1130Linker miscalc (base relocations off by number)There was not enough space in the image to write base relocations.Linker Tools Error LNK1131no library file specifiedThe LIB /EXTRACT command required a library as input, but a library filenamewas not specified.Linker Tools Error LNK1132invalid format for MS-DOS stub file "filename"The filename specified with the /STUB option was not a valid real-mode MS-DOS executable (.EXE) file.Linker Tools Messages Page 6 of 37Linker Tools Error LNK1136invalid or corrupt fileThe input file either has a corrupt header or is zero size or abnormally small.See Corrupt Object File for more information.Linker Tools Error LNK1137invalid argument specified with /SECTIONEither the name or the attributes argument to the /SECTION option is specified incorrectly.Linker Tools Error LNK1140too many modules for program database; relink with /PDB:NONEThe project contains more than 4096 modules. One of the following is asolution:l Relink using /PDB:NONE.l Compile some modules without debugging information.l Reduce the number of modules.Linker Tools Error LNK1141failure during build of exports fileLINK could not build the exports (.EXP) file. Causes of this error include system problems such as insufficient memory and syntax errors in options or moduledefinition statements. This error is preceded by another error that givesadditional information.Linker Tools Error LNK1143invalid or corrupt file: no symbol for COMDAT section numberThe object file is corrupt. Rebuild the file. See Corrupt Object File for more information.Linker Tools Error LNK1144error with LINK_REPRO var; cannot open "filename"The linker could not create filename. One of the following may be a cause:l Check that you've set your LINK_REPRO environment variable to anexisting directory and not the current directory.l Make sure there are no read-only files in the directory.l Make sure none of the files in the LINK_REPRO directory are open byanother process, because the linker needs to write to them.Linker Tools Error LNK1145/MERGE created circular link for section "section"You attempted to merge a section into itself. Check the /MERGE options.Linker Tools Error LNK1146Linker Tools Messages Page 7 of 37no argument specified with option "option"The given option requires an argument.Linker Tools Error LNK1147invalid number specified with option "option"The argument to the given option was specified incorrectly.Linker Tools Error LNK1148failure during conversion to COFF: cannot copy temp file filenameEDITBIN could not convert the input file to COFF. When EDITBIN converts a file,it creates a temporary file, then copies the file. One of the following may be a cause: l The given file does not have the appropriate permissions.l There was not enough disk space to create the file.l The drive being written to was not available, possibly due to a network problem.Linker Tools Error LNK1149output filename matches input filename "filename"The output filename specified with the /OUT or /IMPLIB option was the same asan input file.Return to Main Linker Error PageLinker Errors LNK1152 to LNK1189Linker Tools Error LNK1152cannot resolve one or more undecorated symbolsThis error is preceded by one warning LNK4022 for each undecorated symbolthat could not be resolved and by at least two warnings LNK4006 for theduplicate symbols found for the undecorated symbol.Linker Tools Error LNK1153/VXD command-line option requiredYou attempted to build a virtual device driver without the /VXD option. Relinkwith the /VXD option.Linker Tools Error LNK1154specified import library filename matches exports file "filename"The filename specified with LINK /IMPORT or with LIB /DEF /OUT conflicted with the filename given by LINK or LIB to the exports file, which is formed from thebase name of the main output file and the extension .EXP.Linker Tools Error LNK1155special symbol "symbol" already definedLinker Tools Messages Page 8 of 37The given symbol is reserved for use by LINK.Linker Tools Error LNK1156.sbss section not supportedAn object file contained an .sbss section.Linker Tools Error LNK1157fixup overflow; offset of target symbol "symbol" greater than +-8MBThe VXD is too large, or the sections are not arranged properly.Linker Tools Error LNK1158cannot run "filename"The given executable file called by LINK is not in the directory that contains LINK and is not in a directory specified in the PATH environment variable. Linker Tools Error LNK1159no output file specifiedNo name was specified for the main output file (executable file or DLL). LINK derives the default name of the output file from the base name of the first object file. If no object files are specified, and if the /OUT option is not used, this error occurs.Linker Tools Error LNK1160library with zero objects not allowedAn attempt was made to remove an object from a library that contained only that object. The object was not removed.Linker Tools Error LNK1161invalid export specificationEither the /EXPORT option or the EXPORTS module-definition statement incorrectly specified an export. A possible cause is a typing error.Linker Tools Error LNK1162expected aux symbol for comdat section numberThe linker expected to find an auxiliary symbol table for the indicated COMDAT but could not. The object file is probably corrupt. See Corrupt Object File for more information.Linker Tools Error LNK1163invalid selection for comdat section numberThe byte in the object file indicating the type of COMDAT section is invalid. The object file is probably corrupt. See Corrupt Object File for more information. Linker Tools Error LNK1164section section alignment (number) greater than /ALIGN valueThe alignment size for the given section in the object file exceeds the value specified with the /ALIGN option. The /ALIGN value must be a power of 2 and Linker Tools Messages Page 9 of 37must equal or exceed the section alignment given in the object file. Either recompile with a smaller section alignment or increase the /ALIGN value. Linker Tools Error LNK1165link failed because of fixup errorsThe build failed due to fixup errors. The /FORCE or /FORCE:UNRESOLVED option overrides this error.Linker Tools Error LNK1166cannot adjust code at offset=offset, va=valueLINK was unable to pad the code as required. Certain instructions are not allowed to cross page boundaries on some processors. LINK attempts to add pads to correct this situation. In this case, LINK could not work around the problem.Linker Tools Error LNK1167file contains relocs but header has no machine typeA converted COFF object did not have a machine type specified in its header. One cause of this error is omitting a machine type when converting a .RES file in a separate step before linking.Linker Tools Error LNK1168cannot open filename for writingThe given file does not have write permission.Linker Tools Error LNK1169one or more multiply defined symbols foundThe build failed due to multiple definitions of one or more symbols. This error is preceded by error LNK2005. The /FORCE or /FORCE:MULTIPLE option overrides this error.Linker Tools Error LNK1170line in command file contains limit or more charactersThe length of a line in a command file must be less than the given limit.Linker Tools Error LNK1171unable to load filenameThe given DLL was unavailable. The possible locations for the DLL are the current directory, the system directory, the Windows directory, and the directories specified in the PATH environment variable.Linker Tools Error LNK1172more than one object with the name "object" found; rename object(s) orrelink /PDB:NONEA library contained two or more objects with the same name. Do one of the following:Linker Tools Messages Page 10 of 37l Rename the objects using unique names and rebuild the library.l Link using the /PDB:NONE option.Linker Tools Error LNK1173unable to find entrypoint function in filenameThe given function does not exist in the given DLL.Linker Tools Error LNK1174unable to /REBASE filename; not a valid Win32 imageThe format of the given file was invalid.Linker Tools Error LNK1175failed to /REBASE filenameThe rebase operation failed on the given file.Linker Tools Error LNK1177TOC size limit exceededThe linker was unable to create a TOC (Table of Contents) in your image file. The limit is 2048 entries in the TOC.Linker Tools Error LNK1178missing MODEND record; file is invalid or corruptThe linker tool tried to convert an OMF object module to COFF format but could not find an expected MODEND (module end) record in the OMF object. The OMF object module is corrupt and needs to be recreated or recopied. See Corrupt Object File for more information.Linker Tools Error LNK1179invalid or corrupt file: duplicate comdat comdatAn object module contained two or more COMDATs with the same name. One possible cause is if you use the Visual C++ /H option with the Visual C++ /Gy option. The /H option limits the length of external names, and the /Gy option packages functions in COMDATs.Linker Tools Error LNK1180insufficient disk space to complete linkThe linker tool was unable to complete a file operation since the operating system reported that the disk is full. Free up space on your local and network drives (if you are writing files there).Linker Tools Error LNK1181cannot open input file "filename"The linker tool could not find "filename" because it does not exist or the path was not found.Linker Tools Error LNK1182Linker Tools Messages Page 11 of 37cannot have more than 64K exportsYou have reached the linker's limit of 65,536 exports.Linker Tools Error LNK1183invalid or corrupt file: extended relocation count number less than 65535The COFF object file is corrupt since it contains an extended relocation count that is less than 0xFFFF. See Corrupt Object File for more information.Linker Tools Error LNK1184invalid section name "section" specified in option or directive "option"You gave the linker an invalid section name in option. Invalid section names contain "$" or blanks.Linker Tools Error LNK1185invalid section name "section" specifiedYou gave the linker an invalid section name in a .DEF file. Invalid section names contain "$" or blanks.Linker Tools Error LNK1186invalid or corrupt COFF object; reloc to undefined static symbol "symbol"Your COFF object module is corrupt since it contains a relocation entry for an undefined static symbol. See Corrupt Object File for more information.Linker Tools Error LNK1187Corrupt object - unmatched name relocation; ignoredYour object file contains bad relocation information. Recopy or recreate the object file. See Corrupt Object File for more information.Linker Tools Error LNK1188BADFIXUPSECTION:: invalid fixup target "symbol"; possible zero length section This message is issued only for VxD links when the target of a relocation does not have a section. With LINK386 (an older version), an OMF GROUP record (generated by a MASM GROUP directive) may have been used to combine the zero length section with another non-zero length section. COFF format does not support the GROUP directive and zero-length sections. When LINK automatically converts this type of OMF objects to COFF, this error may occur.Linker Tools Error LNK1189LIBTOOMANYMEMBERS:: library limit of number objects exceededThe limit of 65535 objects or members in a library has been exceeded.Return to Main Linker Error PageLinker Errors LNK1190 to LNK1581Linker Tools Error LNK1190Linker Tools Messages Page 12 of 37invalid fixup found, type typeThe object file has become corrupted. Recompile.Linker Tools Error LNK1194cannot delay-load dll name due to import of data symbol symbol name; relink without /DELAYLOAD:dll nameYou cannot delay load a DLL if data is imported from it.Linker Tools Error LNK1195target machine "machine" requires "option"Add the required option.Linker Tools Error LNK1196invalid or corrupt import object: unknown versionThe import library has become corrupted. Rebuild the library.Linker Tools Error LNK1197invalid or corrupt import object: unknown typeThe import library has become corrupted. Rebuild the library.Linker Tools Error LNK1198invalid or corrupt import object: unknown name typeThe import library has become corrupted. Rebuild the library.Linker Tools Error LNK1199invalid or corrupt import object: non-zero reserved fieldsThe import library has become corrupted. Rebuild the library.Linker Tools Error LNK1200error reading program database "filename"The given program database (PDB) could not be read, probably because it is corrupted. If filename is the PDB for an object file, recompile the object file; use the /debug:full and /pdbfile options. If filename is the PDB for the main outputfile and this error occurred during an incremental link, delete the PDB and relink.Linker Tools Error LNK1201error writing to program database "filename"; check for insufficient disk space LINK could not write to the program database (PDB) for the output file. One of the following may be a cause:l The file is corrupted. Delete filename and relink.l There was not enough disk space to write to the file.l The drive being written to was not available, possibly due to a network problem.Linker Tools Error LNK1202Linker Tools Messages Page 13 of 37"filename" missing debugging information for referencing moduleThe given program database (PDB) for an object file was invalid. Recompile the object file; use CL's /Zi option.Linker Tools Error LNK1203"filename" missing current debugging information for referencing moduleThe given program database (PDB) for an object file was invalid. Recompile the object file; use CL's /Zi option.Linker Tools Error LNK1204"filename" compiled /Yc /Yu /Z7; cannot create PDB; recompile with /Zi Multilayered program databases (PDBs) are not supported in combination with old-style debugging information. Recompile using CL's /Zi option.Linker Tools Error LNK1206cannot overwrite Visual C++ 1.0 PDB "filename"; delete and rebuildThis version of LINK cannot write to an existing program database (PDB) created using older versions of the visual development environment. Delete filename and rebuild.Linker Tools Error LNK1207incompatible PDB format in "filename"; delete and rebuildThis version of LINK cannot write to the existing program database (PDB). Delete filename and rebuild.Linker Tools Error LNK1209program database "filename" differs from previous link; relink or rebuildThe given program database (PDB) is invalid and possibly corrupt. Relink. If filename is also the PDB for an object file, recompile to recreate the PDB. Linker Tools Error LNK1210insufficient memory for incremental link; relink with /INCREMENTAL:NO There was not enough virtual memory available for LINK to create the incremental status (.ILK) file.Linker Tools Error LNK1211precompiled type information not found; "filename" not linked or overwritten The given object file, compiled with /Yc, either was not specified in the LINK command or was overwritten.Linker Tools Error LNK1212error opening program database; file is in useThe PDB is already in use by another application.Linker Tools Error LNK1213unexpected import object encounteredThe import library has become corrupted. Rebuild the library.Linker Tools Messages Page 14 of 37Linker Tools Error LNK1221a subsystem can't be inferred and must be definedThe linker does not have enough information to infer which subsystem you will target your application. To fix this error, use the /SUBSYSTEM option.Linker Tools Error LNK1561entry point must be definedThe symbol specified by the /ENTRY option is not defined.Linker Tools Error LNK1581corrupted object or old compiler (bad Pcode entry point)Your object file contained a bad entry point. The object file is probably corrupt.。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
相关文档
最新文档