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

Last reviewed: July 17, 1995
Article ID: Q22314
The information in this article applies to:
  • Microsoft FORTRAN for MS-DOS, versions 4.0, 4.0a, 4.01, 4.1, and 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 reference words: 4.00 4.00a 4.10 5.10
KBCategory: kbtool kberrmsg kbprb
KBSubcategory: LinkIss


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 17, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.