FIX: "Invalid Library" When Rebuilding an Application

Last reviewed: October 20, 1997
Article ID: Q113798
2.5x 2.60 | 2.5x 2.60 | 2.50b 2.60
WINDOWS   | MS-DOS    | MACINTOSH
kbother kbbuglist kbfixlist kberrmsg

The information in this article applies to:

  • Microsoft FoxPro Library Construction Kit for Windows and MS-DOS, versions 2.5x, 2.6
  • Microsoft FoxPro Library Construction Kit for Macintosh, version 2.5b, 2.6

SYMPTOMS

When you attempt to rebuild an application with the Rebuild All option in the Build dialog box of the Project Manager, an "Invalid Library" error message will occur if there is an application programming interface (API) library included in the project that does not belong to the current platform.

RESOLUTION

Remove the API libraries from the project.

You should not explicitly add API libraries to your project. When creating cross-platform applications, use the #IF ... #ENDIF structure to specify the correct API library based on the current platform.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in FoxPro version 2.6a for MS-DOS, Windows, and Macintosh.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Load FoxPro for Windows.

  2. Create a project called TEST.

  3. Add a new program called MAIN and type the following commands:

          #IF "WINDOWS" $ UPPER(VERSION(1))
    
               SET LIBRARY TO foxtools.fll
          #ELSE
               SET LIBRARY TO pdrivers.plb
          #ENDIF
    
    

  4. Add the API library FOXTOOLS.FLL as a Library type. This file will automatically be marked as External.

  5. Save the project and quit FoxPro for Windows.

  6. Load FoxPro for MS-DOS.

  7. Open the TEST project.

  8. Choose the Build option in the open project and choose Rebuild All. The error "Invalid Library" will occur. This error occurs because FoxPro for MS-DOS does not recognize FoxPro for Windows API libraries.


Additional reference words: FoxWin FoxDos FoxMac 2.50 2.50a 2.50b 2.60
buglist2.50 buglist2.50a buglist2.50b buglist2.60 fixlist2.60a errmsg err
msg refresh
KBCategory: kbother kbbuglist kbfixlist kberrmsg
KBSubcategory: FxprgFoxtools
Solution Type : kbfix


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: October 20, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.