If you use the Programmer's WorkBench (PWB) to compile a QuickWin program, specify the “Windows QuickWin EXE” project template and set any other compile, link, browse, and debugging options you require. Then build your program. This section describes the steps briefly. For more information about using PWB, see the PWB tutorial in the Environment and Tools manual.
Preparing your PWB QuickWin project requires the following steps:
1.Set up your PATH, INCLUDE, and LIB environment variables so the compiler can find your source, include, and library files. The environment should be correct if you ran the SETUP program to install Microsoft C/C++. For more information, see the Getting Started manual.
2.In PWB, create a new PWB project and choose the C or C++ run-time support option and the “Windows QuickWin EXE” project template.
3.Set up the project's file list using the Edit Project dialog box that appears when you click the OK button in the New Project dialog box. Use the Edit Project dialog box to add files to your project. Add your files with the .C or .CPP extension. You can also add .OBJ, .LIB, and .RC files if you supply custom icons for your client and child windows (see “Using Custom Icons”). QuickWin programs also require a module definition file (with the .DEF extension). If you do not supply your own .DEF file, you must add the default module definition file, CL.DEF, to your project. For more information about .DEF files, see “Compiling from the DOS Command Line”, and consult the Microsoft Windows Software Development Kit Guide to Programming.
4.Set build options for the project (either Debug or Release) in the dialog box brought up by the Options/Build Options menu command.
5.Set any additional compiler, browse, link, NMake, or CodeView options you need. These options can be set in the Options menu.
6.Choose Build or Rebuild All from the Project menu.
Caution:
If you are running PWB from within Windows, do not execute the program from within PWB after you build it. This will spawn a new instance of Windows that runs in real mode. QuickWin programs cannot be run in real mode. Instead, execute your program from your original Windows session.
The project template you selected tells the compiler which libraries to use and sets the appropriate default compiler options. It also defines the _WINDOWS constant for you. This ensures that the QuickWin functions are defined, in case your program uses them. For more details about the libraries and other information required to compile QuickWin programs, see “Compiling from the DOS Command Line”.