Microsoft KB Archive/22314

= PRB: "Invalid Object Module" Error Caused by Incorrect Linker =

Article ID: 22314

Article Last Modified on 9/30/2003

-

APPLIES TO


 * Microsoft FORTRAN Compiler 4.0
 * Microsoft FORTRAN Compiler 4.0a
 * Microsoft FORTRAN Compiler 4.01
 * Microsoft FORTRAN Compiler 4.1
 * Microsoft FORTRAN Compiler 5.1

-



This article was previously published under Q22314



SYMPTOMS
An attempt to link an application fails and the linker generates the following error message:

"Invalid object module"

Specifying the /Tf compiler options switch does not address the problem.



CAUSE
The most likely cause is using an incorrect version of the linker.



RESOLUTION
Use the version of the linker included with the FORTRAN version installed on your machine. Perform the procedure below to determine which linker is currently in use.



MORE INFORMATION
To determine the version of the linker in use, perform the following six steps:


 * 1) At the MS-DOS prompt, set the current directory to the directory in which you build your applications.
 * 2) Enter the command LINK and press ENTER.
 * 3) Note the version number in the linker copyright message.
 * 4) Set the current directory to the directory in which you have installed FORTRAN.
 * 5) Enter the command LINK and press ENTER.
 * 6) Note the version number in the linker copyright message.

If the two linker version numbers do not match, the linker used to build your application is not the linker included with FORTRAN. The most likely causes for this situation are as follows:


 * The directory in which you build your application contains an older copy of LINK.EXE.
 * The PATH MS-DOS environment variable lists a directory that contains an older copy of LINK.EXE before it lists the directory in which you have installed FORTRAN.

To address this problem, perform one of the following two steps:


 * Find the newest copy of the LINK utility by checking the version numbers in the copyright message. Change the name of every copy except the newest to LINK.OLD.
 * In the AUTOEXEC.BAT file, modify the PATH environment variable to list first the directory that contains the most recent version of the LINK utility.

Additional query words: 4.00 nofps 4.00a 4.10 5.10

Keywords: KB22314

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.