KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q57382: QBX Make Library Uses OS/2 Mode Last Used by Make EXE File

Article: Q57382
Product(s): See article
Version(s): 7.00
Operating System(s): MS-DOS
Keyword(s): ENDUSER | SR# S891211-105 | mspl13_basic
Last Modified: 8-JAN-1990

The Make Library menu command of the QuickBASIC Extended (QBX.EXE)
environment that comes with Microsoft BASIC PDS Version 7.00 for
MS-DOS and MS OS/2 will compile currently loaded source modules for
whichever OS/2 mode (real or protected) that the last Make EXE File
menu command compiled for.

(Note that the QBX.EXE environment runs only under OS/2 real mode or
MS-DOS and does not itself run under OS/2 protected mode, although
QBX.EXE can make .EXE programs that run under OS/2 protected mode.)

The Make Library command on the Run menu of the QBX.EXE environment
can be used to make stand-alone libraries for either real or protected
mode operation. However, there is no option in the Make Library dialog
box that allows you to choose which mode the modules of the library
will be compiled for.

The Make Library command will compile the source-code modules for
whichever mode the last Make EXE File command compiled for. That is,
if the OS/2 Protected Mode option in the Make EXE File dialog box was
selected the last time you made an EXE file, then the Make Library
command will compile the library modules for protected mode. If a real
mode (using the DOS or OS/2 Real Mode option) EXE file was made last,
a real mode library will be made the next time Make Library is
invoked.

Note that selecting a mode (protected or real) in the Make EXE File
dialog box and then choosing the Cancel button will not cause the Make
Library command to compile for that mode. BC.EXE must be invoked for
the change to take effect.

Do the following to demonstrate the problem:

1. Invoke QBX and type the following line:

   PRINT "This will be a protected-mode program"

   Now save the program.

2. Make the program into an executable file using the Make EXE File
   menu command. For the target environment (operation mode), select
   the OS/2 Protected Mode option. Choose the Make EXE button to make
   the executable file.

   The "/Lp" option should be one of the parameters on the BC.EXE
   command line that is displayed. This switch is used to compile for
   protected mode.

3. When the executable has been made, the QBX environment should
   reappear on the screen. Choose the Make Library command and select
   the Make Library button to make the library.

   The "/Lp" switch should be one of the parameters on the BC.EXE
   command line that is displayed. This switch is used to compile for
   protected mode.

4. When the QBX environment comes back on the screen, repeat Steps 2
   and 3. However, in Step 2, select the DOS Or OS/2 Real Mode option
   for the target environment. Instead of the "/Lp" switch, the "/Lr"
   switch should be one of the parameters on the BC.EXE command line
   generated by the Make EXE File and the Make Library commands.

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.

Copyright Microsoft Corporation 1986-2002.