PRB: Error Message "<library>.vcx Is Not an Object File" (162368)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 3.0
  • Microsoft Visual FoxPro for Windows 3.0b
  • Microsoft Visual FoxPro for Windows 5.0
  • Microsoft Visual FoxPro for Windows 6.0
  • Microsoft Visual FoxPro for Macintosh 3.0b

This article was previously published under Q162368

SYMPTOMS

If you add an existing Visual FoxPro for Windows 3.0 .vcx class library file into a Visual FoxPro for Windows 5.0 project and attempt to modify an element of the library, you may get the following error message:
<path\library>.vcx is not an object file.

RESOLUTION

Create a copy of the Visual FoxPro for Windows 3.0 class library .vcx file, and then type the following in the command window:
COMPILE CLASSLIB <path\library>.vcx

STATUS

This behavior is by design.

MORE INFORMATION

Compile Classlib compiles source code contained in a memo field named Methods, and becomes compiled into object code that is stored in a memo field named OBJCODE.

Source code for class libraries, stored procedures, and forms are stored in memo fields either in the .vcx file table, the .dbc file table, or the .scx file table. When each is compiled, the object code is placed into a separate memo field. This object code is specific to the FoxPro version.

NOTE: Forms are automatically compiled when they are saved from the Form Designer. If you open a Visual FoxPro for Windows 5.0 form in Visual FoxPro for Windows 3.0, you will receive the following error message:
Error loading file - Methods - record number 2. Object file from <path\form>.scx was compiled in a previous version of FoxPro.

REFERENCES

For additional information, please see the following articles in the Microsoft Knowledge Base:

162076 INF: Conversion of VFP Files From Version 3.0 to 5.0 and Back

(c) Microsoft Corporation 1997, All Rights Reserved.
Contributions by Perry Newton, Microsoft Corporation

Modification Type:MajorLast Reviewed:12/3/2003
Keywords:kberrmsg KB162368