The information in this article applies to:
SUMMARY
This article explains how to get some library files from the Microsoft
Software library, and it describes how to link Microsoft Basic PDS version
7.1 with C version 5.1, FORTRAN version 5.0, or Pascal version 4.0 for MS-
DOS. It is designed only for owners of Microsoft Basic Professional
Development System (PDS) version 7.1, Microsoft C Compiler version 5.1,
Microsoft FORTRAN Compiler version 5.0 or 5.1, and Microsoft Pascal
Compiler version 4.0 for MS-DOS.
Q79825 BUG: Initialization Problem with FORTRAN and Basic MORE INFORMATIONThe following file is available for download from the Microsoft Software Library: BB0345.EXEFor more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base: Q119591 How to Obtain Microsoft Support Files from Online ServicesRun BB0345.EXE in an empty directory to get the following three files: LLIBCER.LIB, LLIBCAR.LIB, and READ.ME. The READ.ME file repeats all information from this article.
IntroductionThis article describes how to link Basic Professional Development System (PDS) version 7.1 with C 5.1, FORTRAN 5.0, or Pascal 4.0.This information applies only to Microsoft Basic PDS version 7.1, Microsoft C Compiler version 5.1, Microsoft FORTRAN Compiler version 5.0, and Microsoft Pascal Compiler version 4.0 for MS-DOS. Basic programs compiled with Microsoft Basic PDS 7.1 use the Microsoft C version 6.0 and QuickC 2.50 format for start-up code and memory allocation. This format has changed so dramatically between C 5.1 and C 6.0 that Basic PDS 7.1 is not directly compatible with C 5.1, FORTRAN 5.0, or Pascal 4.0 (which use the C 5.1 format for start-up code and memory allocation). NOTE: Microsoft Basic PDS 7.1 is compatible with Microsoft C PDS 6.0. Basic PDS 7.0 is compatible with C 5.1, but Basic PDS 7.1 is not directly compatible with C 5.1 unless you use the method described in this application note.To make Basic PDS 7.1 compatible with C 5.1, FORTRAN 5.0, or Pascal 4.0, you must alter the FORTRAN or Pascal language libraries and incorporate modules from the C 6.0 run-time libraries, as explained further below. The files you downloaded from the MSL include the following two C 6.0 run- time libraries (which were built by running the C 6.0 SETUP.EXE program and choosing no GRAPHICS.LIB and no PGCHART.LIB included in the combined libraries): LLIBCER.LIB and LLIBCAR.LIBThese provided files support only the large memory model, the emulation and alternate math packages, and the MS-DOS (or real mode under OS/2) operating system. Pascal 4.0To make Basic PDS 7.1 compatible with Pascal 4.0, perform the following steps:
FORTRAN 5.0To make Basic PDS 7.1 compatible with FORTRAN 5.0, perform the following steps:
Linking Your Compiled ProgramsOnce you have modified the Pascal or FORTRAN library (Newmixed.LIB as described above) and you have compiled your Pascal or FORTRAN source file(s), you must link your object modules with the proper libraries in the proper order. In the LINK command line, you must specify the Basic library first, the C 6.0 library LLIBCER.LIB or LLIBCAR.LIB (included with this application note) second, and your new Pascal or FORTRAN library (Newmixed.LIB) last. You also must link with the /NOD and /NOE options to ensure that the default libraries the object files normally use are ignored and only the libraries you explicitly list are used. The following is an exampleLINK /NOD/NOE Bas1.OBJ + Mixed.OBJ, Bas1.EXE,,BRT71ENR.LIB + LLIBCER.LIB + Newmixed.LIB;where Bas1.OBJ is your Basic main program, and Mixed.OBJ is your Pascal or FORTRAN object module. C 5.1To make Basic PDS 7.1 compatible with C 5.1, you must use a method different from the method used above for Pascal or FORTRAN.Because the Basic PDS 7.1 and C 5.1 libraries aren't designed to be compatible, there isn't an easy way to make the two libraries work together. In this case, you must use the provided C 6.0 run-time libraries, which provide support for emulator (/FPi) (LLIBCER.LIB) and support for alternate math (/FPa) (LLIBCAR.LIB) support for MS-DOS. The following are examples of the required Basic 7.1 and C 5.1 compiling and linking steps
where the LLIBCER.LIB file above is one of the two C 6.0 libraries
(LLIBCER.LIB or LLIBCAR.LIB) provided with this application note.
(Don't use the C 5.1 run-time library of the same name.)
Final Note on CompatibilityAlthough the above methods have been designed to produce compatible results, we have not put them through a standard Microsoft mixed- language testing cycle, and it is possible that you may still encounter compatibility problems under certain conditions. We cannot guarantee the complete success of mixed-language programming of Basic 7.1 with C 5.1, FORTRAN 5.0, or Pascal 4.0. Further problems or questions can be directed to Microsoft Language Support Services.Additional query words: BasicCom softlib BB0345.EXE kbfile
Keywords : |
Last Reviewed: December 2, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |