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

ID: Q22314


The information in this article applies to:
  • Microsoft FORTRAN for MS-DOS, versions 4.0, 4.0a, 4.01, 4.1, 5.1


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 :
Version : :4.0,4.01,4.0a,4.1,5.1
Platform :
Issue type :


Last Reviewed: November 3, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.