How to Create .PLB Files with Visual C++ 1.0 Professional

ID: Q100805

2.50 MS-DOS kbtool kbprg

The information in this article applies to:

SUMMARY

Below are step-by-step instructions for compiling a .PLB file using Visual C++ version 1.0 and the FoxPro Library Construction Kit (LCK) version 2.5.

NOTE: You must use Visual C++ 1.0 Professional to create an MS-DOS application. Visual C++ 1.0 Standard does not create MS-DOS executable (.EXE) files.

MORE INFORMATION

NOTE: In the following procedure, "<model>" is "S", "M", "L", or "C".

 1. Choose a memory model for your .PLB file.

 2. From the VC Workbench menu, choose Project -> New to bring up the
    New Project dialog box.

 3. In the New Project dialog box, choose "Project Type = MS-DOS
    Application (.EXE)", and then close the dialog box.

    After you close the New Project dialog box, the Edit - <project>
    dialog box appears.

 4. Select all of your C API source modules for inclusion in the
    project.

 5. Select the appropriate API_M<model>.OBJ file that comes with the
    LCK 2.5 product, and close the Edit - <project> dialog box.

 6. From the VC Workbench menu, choose Options -> Project, which
    brings up the Project Options dialog box.

 7. In the Project Options dialog box, choose Compiler.

 8. In the Compiler Options dialog box, select the Common To Both
    option button.

 9. Under the Code Generation category, set Struct Member Byte
    Alignment to "1 Byte".

10. Under the Memory Model category, set Model appropriate to <model>
    and Segment Setup to "SS != DS; DS NOT loaded at function entry".

11. Close the Compiler Options dialog box.

12. From the Project Options dialog box, choose Linker.

13. In the Linker Options dialog box, select the Common To Both option

    button.

14. Under the Input category, add to the Libraries list the
    appropriate API_M<model> that comes with the LCK 2.5 product.

15. Remove "llibce" from the Libraries list.

    NOTE: The actual name of this library will vary according to the memory
    model in use. For example, if you're using the large memory model, the
    library is "llibce." If you're using the small memory model, the
    library is "slbice."

16. Under the Memory Image category, set Stack Size to "0".

17. Under the Miscellaneous Option, enter /NOE and /NONULLS in the

    Other Options list.

You are now ready to build the .PLB file.

The output file will have an .EXE extension. After compilation, you can test the newly created module by renaming it with a .PLB extension or by issuing the following command:

   set library to <module>.exe

Additional reference words: FoxDos 2.50 LCK unresolved external KBCategory: kbtool kbprg KBSubcategory: FxtoolLck

Last Reviewed: October 10, 1997