.MLB Files Must Include an .EXP File

Last reviewed: May 17, 1996
Article ID: Q108680
The information in this article applies to:
  • Microsoft FoxPro Library Construction Kit for Macintosh, version 2.5b

SUMMARY

All library files compiled with the Macintosh Programmer's Workshop (MPW) compiler must include an example file.

The source code for the library file has an extension of .C. The example file must have the same name as the source code file with the extension changed to .EXP. For example, if the source code is named TEST.C, the example file would be named TEST.EXP.

The following is a description of each section in an example file:

  1. The first section contains introductory comments, which are optional and can be excluded. Comments are delimited with /* and */.

          /*
    
             File: MyLibrary.exp
             Contains: Exports file for the Library function set.
             Copyright: (c) 1993 by John Doe, all rights reserved.
          */
    
    

  2. The second section declares the library. Each .MLB file in the System Folder:Extensions subfolder must have a unique library name. If library names are not unique, FoxPro will generate an error stating that the library file cannot be found. In the example below, the library name is MyLibrary. The only text that should be changed is the library name, which follows Fox$ on the line beginning with id =.

          Library
    
                {
                id = "Fox$MyLibrary";
                version = 1.3b6;
                flags = system7;
                heap = application, hold;
             };
    
    

  3. The next section declares the exported library function set that FoxPro recognizes. Enter a valid filename following "API$" on the line beginning "id = ". The filename must be in all uppercase (as shown in the example below).

          FunctionSet Testlib
    
             {
                id = "Fox:API$MYLIBRARY.MLB, 1.3";
                version = 1.0...1.3b6;
                exports = extern pascal DispatchAPI;
             };
    
        *** End Of File
    
    
When the source code file is compiled, it should be given the same name as stated in the FunctionSet. In this example, the compiled file would be named MYLIBRARY.MLB.

MORE INFORMATION

During installation, a sample .EXP file is copied onto the hard drive. The filename is TEST.EXP and it is located in the Examples subfolder of the FoxLCK folder.


Additional reference words: FoxMac 2.50b LCK
KBCategory: kbinterop kbtool kbprg kbcode
KBSubcategory:


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