PRB: "Not an Object File" Occurs When Running a Program

Last reviewed: April 5, 1996
Article ID: Q149069
The information in this article applies to:
  • Microsoft FoxPro for UNIX, version 2.6

SYMPTOMS

When attempting to run a program with the DO command, the following error message occurs:

   <filename> is not an object file.

CAUSE

This error occurs when both of the following conditions exist:

  • The file extension was not specified on the DO command.

    -and-

  • A file exists with the same name as the program without an extension.

RESOLUTION

Specify the extension of the program in the DO command.

STATUS

This behavior is by design.

MORE INFORMATION

In FoxPro for UNIX, the order of execution for programs is different from the way it is in FoxPro for MS-DOS, FoxPro for Windows, or FoxPro for Macintosh.

The order of execution for programs in FoxPro for UNIX is as follows:

   EXE
   APP
   no extension
   FXP
   PRG

Steps to Reproduce Behavior

  1. Create a program called Test.prg with the following code:

        WAIT WINDOW "I'm in Test.prg"
    

  2. Create a file called Test (with no extension) with the following lines:

    Hello This is just a text file

  3. Type the following command in the Command window:

    DO Test

    Note that the error described in the "Symptoms" section occurs.

  4. Type the following command in the Command window:

    DO Test.prg

    Note that the Wait Window appears.


Additional reference words: 2.60 FoxUnix
KBCategory: kbprg kbprb kberrmsg
KBSubcategory: FxprgGeneral



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: April 5, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.