PRB: .CPP Extension w/ Library Construction Kit Causes Errors

ID: Q101803

2.50 2.50a | 2.50 2.50a 3.00

MS-DOS      | WINDOWS
 kbprb

The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 3.0
  • Microsoft FoxPro Library Construction Kit, versions 2.5, 2.5a
  • Microsoft FoxPro for MS-DOS, versions 2.5, 2.5a
  • Microsoft FoxPro for Windows, versions 2.5, 2.5a

SYMPTOMS

In Microsoft Visual C++, the .CPP extension can cause errors when it is used to create a .PLB or .FLL file with the FoxPro 2.5 Library Construction Kit (LCK).

For example, using the .CPP extension to create a .FLL file (FoxPro for Windows library) can cause the error "<path>\PROAPIML.LIB (c:\dosdev\source\winapi16.c) : error L2029: '_FoxTable' : unresolved external", where <path> is the path to PROAPIML.LIB.

RESOLUTION

To avoid the error, do one of the following:

  • Rename the program to have a .C extension.

    -or-

  • Declare FoxTable as external, as follows:

          extern "C" FoxTable _FoxTable =
          {
    
    (FoxTable FAR *) 0, sizeof(myFoxInfo) / sizeof(FoxInfo), myFoxInfo };
Additional reference words: VFoxWin 3.00 FoxDos FoxWin 2.50 2.50a KBCategory: kbprb KBSubcategory: FxtoolLck
Keywords          : kbcode FxtoolLck 
Version           : 2.50 2.50a | 2.50 2.50a 3.00
Platform          : MS-DOS WINDOWS


Last Reviewed: May 22, 1998
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.