home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v3.zip / INF / DDE3TT1E.INF (.txt) < prev    next >
OS/2 Help File  |  1993-08-30  |  190KB  |  1,004 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Special Notices ΓòÉΓòÉΓòÉ
  3.  
  4. References in this information to IBM products, programs, or services do not 
  5. imply that IBM intends to make these available in all countries in which IBM 
  6. operates. 
  7.  
  8. Any reference to an IBM licensed program in this help is not intended to state 
  9. or imply that only IBM's licensed program may be used. Any functionally 
  10. equivalent product, program, or service that does not infringe any of IBM's 
  11. intellectual property rights may be used instead of the IBM product, program, 
  12. or service. 
  13.  
  14. Evaluation and verification of operation in conjunction with other products, 
  15. except those expressly designated by IBM, is the user's responsibility. 
  16.  
  17. IBM may have patents or pending patent applications covering subject matter in 
  18. this help.  The furnishing of this help does not give you any license to these 
  19. patents. 
  20.  
  21. The following terms used in this publication are trademarks or service marks of 
  22. IBM Corporation in the United States or other countries. They are denoted by an 
  23. asterisk (*) when they first appear in the text. 
  24.  
  25.   IBM 
  26.   OS/2 
  27.   C Set ++ 
  28.   Presentation Manager 
  29.   Workplace Shell 
  30.   WorkFrame/2. 
  31.  
  32.  
  33. ΓòÉΓòÉΓòÉ 2. Start Here ΓòÉΓòÉΓòÉ
  34.  
  35. About WorkFrame/2 Version 1.1 
  36.  
  37. The IBM* WorkFrame/2* Version 1.1 integrated development environment provides a 
  38. project-oriented environment that you can customize to suit your needs. In 
  39. addition to its graphical interface, which makes tasks such as setting compiler 
  40. options quick and easy, WorkFrame/2 also provides useful tools such as a Make 
  41. File Creation Utility and Library Utility to enhance your productivity. 
  42.  
  43. The WorkFrame/2 V1.1 product integrates the IBM C/C++ Tools compiler, debugger, 
  44. Developer's Toolkit tools, and any other tools you choose, to create a complete 
  45. development environment. 
  46.  
  47. Please select the Forward push button to continue. 
  48.  
  49.  
  50. ΓòÉΓòÉΓòÉ 2.1. About This Tutorial ΓòÉΓòÉΓòÉ
  51.  
  52. This tutorial assumes you are using the IBM* C/C++ Tools compiler. If you are 
  53. not, you can still review the tutorial to learn how to set up projects and 
  54. invoke actions. 
  55.  
  56. Using a simple program provided with the IBM C/C++ Tools product, you will 
  57. interact directly with the WorkFrame/2* V1.1 product to go through the 
  58. development process, from the creation of the program as a project to its 
  59. integration as a tool, and finally, its deletion. 
  60.  
  61. This tutorial walks you through the following series of WorkFrame/2 V1.1 tasks 
  62. and takes one to two hours to complete: 
  63.  
  64. o Setting up your environment 
  65. o Creating a project 
  66. o Editing a file 
  67. o Creating a Make file 
  68. o Making a project 
  69. o Running a project 
  70. o Adding a tool 
  71. o Deleting a project. 
  72.  
  73. Note:  Work through the lessons in the correct order without skipping any 
  74.        lessons.  Each lesson builds on the work you have done in the previous 
  75.        lessons. 
  76.  
  77.  
  78. ΓòÉΓòÉΓòÉ 2.2. Using this Tutorial ΓòÉΓòÉΓòÉ
  79.  
  80. If you want to leave the tutorial and come back to it at a later time, use the 
  81. system menu to close the WorkFrame/2* V1.1 product, and when prompted to save 
  82. the profile, click on the Yes push button. 
  83.  
  84. For convenience, you might prefer to print the tutorial rather than follow it 
  85. online.  To print it, select the Print push button below. 
  86.  
  87. Because the WorkFrame/2 interface offers a number of features that are ideal 
  88. for mouse users, this tutorial describes the steps as performed with a mouse. 
  89. If you prefer, you can also perform these steps using your keyboard.  Shortcut 
  90. keys are indicated on pull-down menus, and underlined in windows. 
  91.  
  92. The WorkFrame/2 product has online help.  If you would like additional help for 
  93. an option, entry field,  or push button, make that item active and press F1 or 
  94. the help button. For general help on the active window, press F2. You can also 
  95. access help from the Help pull-down. 
  96.  
  97.  
  98. ΓòÉΓòÉΓòÉ 2.3. About the Sample Program ΓòÉΓòÉΓòÉ
  99.  
  100. If you installed the IBM* C/C++ Tools product in the default C:\IBMCPP 
  101. directory, the sample program HELLO2.C that you will use for this tutorial is 
  102. in the C:\IBMCPP\WKFRAME directory. 
  103.  
  104. Note:  This tutorial assumes that you installed the IBM C/C++ Tools product in 
  105.        the default C:\IBMCPP directory, and the WorkFrame/2 version 1.1 product 
  106.        under C:\IBMWF. If you installed them in different directories, 
  107.        substitute your own directory name wherever you see these paths. 
  108.  
  109.  
  110. ΓòÉΓòÉΓòÉ 3. Lesson 1: Customizing the Environment ΓòÉΓòÉΓòÉ
  111.  
  112. The WorkFrame/2* V1.1 product allows you to size and position the windows 
  113. within the WorkFrame/2 environment, change the color of the background, change 
  114. the color and font of text within the windows, and add tools to the tools list. 
  115.  
  116. In this lesson, you will start WorkFrame/2 V1.1 and learn how to customize its 
  117. environment. 
  118.  
  119. All customization that you perform while working with the WorkFrame/2 product 
  120. can be saved so that your settings are preserved for the next time you use the 
  121. product. 
  122.  
  123.  
  124. ΓòÉΓòÉΓòÉ 3.1. Starting WorkFrame/2 V1.1 ΓòÉΓòÉΓòÉ
  125.  
  126. You can start WorkFrame/2* V1.1 from an OS/2* command prompt, or from the 
  127. WorkFrame/2 V1.1 folder on the Desktop. 
  128.  
  129. Starting WorkFrame/2 from a Command Line 
  130.  
  131.  1. At an OS/2 command prompt, change to the WorkFrame/2 directory, C:\IBMWF. 
  132.  
  133.  2. Start the WorkFrame/2 product by typing: 
  134.  
  135.            WFENV
  136.  
  137.     This command file sets up any necessary environment variables and invokes 
  138.     the WorkFrame/2 V1.1 product. 
  139.  
  140. Starting WorkFrame/2 V1.1 from the Desktop 
  141.  
  142. You can also start the WorkFrame/2 product directly from the Desktop folder. 
  143.  
  144.  1. From the Desktop, select the IBM WorkFrame/2 icon. The IBM WorkFrame/2 - 
  145.     Contents window appears. 
  146.  
  147.  2. From this window select the WorkFrame/2 icon. The WorkFrame/2 logo appears. 
  148.  
  149.  3. Click on OK to close the logo window and proceed to the product windows. 
  150.     The WorkFrame/2 product is opened and a menu bar and two windows appear. 
  151.  
  152.  
  153. ΓòÉΓòÉΓòÉ 3.2. Two Initial Windows ΓòÉΓòÉΓòÉ
  154.  
  155. When you start the WorkFrame/2* V1.1 product for the first time, the 
  156. WorkFrame/2 logo appears (if you did not disable the logo display from the 
  157. operating system).  Click on OK to close the logo window and proceed to the 
  158. product windows. A menu bar and two windows appear. 
  159.  
  160. The two windows that appear are the Action Log and the Project Control windows. 
  161.  
  162. The Action Log window lists the tasks you have performed using the WorkFrame/2 
  163. product.  Whenever you start or end a task, a line is written to the Action 
  164. Log, giving you an audit trail of activities performed in a particular session. 
  165.  
  166. The Project Control window lists your existing projects. The project window 
  167. currently lists several projects that are provided with the C/C++ Tools and 
  168. WorkFrame/2 product. From this window, you can add new projects, or change and 
  169. delete existing projects.  You can also select the project you want to work 
  170. with from the Project Control window. 
  171.  
  172.  
  173. ΓòÉΓòÉΓòÉ 3.3. Changing the WorkFrame/2 V1.1 Environment ΓòÉΓòÉΓòÉ
  174.  
  175. Try performing these customization tasks: 
  176.  
  177.  1. You can move and size windows within the WorkFrame/2* V1.1 environment just 
  178.     as you do with any other window in the Workplace Shell*.  Position and size 
  179.     the windows as they suit you. 
  180.  
  181.  2. Try changing the background color for the main window: 
  182.  
  183.     a. From the Configure pull-down menu, select Background  Color. 
  184.  
  185.     b. From the Configure Background Color window, click on a color of your 
  186.        choice. 
  187.  
  188.     c. Click on OK to change the color of the background from the default color 
  189.        to your selected color. 
  190.  
  191. You can also use the Configure pull-down to specify the tools you want in your 
  192. tools list, the sessions you want included in the Switch List, and other 
  193. preferences. Lesson 7: Adding the Program to the Tools List will show you how 
  194. to add a tool to your tools list. 
  195.  
  196.  
  197. ΓòÉΓòÉΓòÉ 3.4. Saving the Changes ΓòÉΓòÉΓòÉ
  198.  
  199. To save the settings you made to the WorkFrame/2* V1.1 environment: 
  200.  
  201.      From the File pull-down, select Save Settings  Both to save both your 
  202.      window positions and your profile, which consists of your selection of 
  203.      fonts, colors, tools, and other preferences. 
  204.  
  205.  
  206. ΓòÉΓòÉΓòÉ 3.5. Lesson 1: Summary ΓòÉΓòÉΓòÉ
  207.  
  208. You have learned how to: 
  209.  
  210.  o Start WorkFrame/2* V1.1 
  211.  
  212.  o Use the Action Log and Project Control windows 
  213.  
  214.  o Size and position WorkFrame/2 windows 
  215.  
  216.  o Change the background color 
  217.  
  218.  o Save the changes that you made so that every time you start up the 
  219.    WorkFrame/2 V1.1, the screen appears as it does now. 
  220.  
  221.  
  222. ΓòÉΓòÉΓòÉ 4. Lesson 2: Creating Projects ΓòÉΓòÉΓòÉ
  223.  
  224. To begin developing a program using the WorkFrame/2* V1.1 product, you must 
  225. first create a project for it. In this lesson you will create the HELLO2 
  226. project, and associate the project with the IBM* C/C++ Tools language profile 
  227. and a number of compile and link options. 
  228.  
  229. A WorkFrame/2 V1.1 project is a grouping of files that appear in a WorkFrame/2 
  230. window.  A project can be either a base project or a composite project. 
  231.  
  232. A base project consists of a language profile, a source file or files, a make 
  233. file, a target file, and some associated compile, link and make and debug 
  234. options. 
  235.  
  236. A composite project is a collection of base projects or other composite 
  237. projects.  Composite projects allow you to arrange projects hierarchically. 
  238.  
  239.  
  240. ΓòÉΓòÉΓòÉ 4.1. Creating the HELLO2 Project ΓòÉΓòÉΓòÉ
  241.  
  242. To create the HELLO2 project: 
  243.  
  244.   1. Click on the New push button in the Project Control window to open the New 
  245.      Project window. 
  246.  
  247.   2. In the Project description field of the New Project window, type: 
  248.  
  249.           Hello2 Sample Project
  250.  
  251.      The description you give in this field is used to identify the project in 
  252.      headings, messages, and lists.  Ensure that each project you create has a 
  253.      unique description. 
  254.  
  255.   3. In the Project file name field, type: 
  256.  
  257.           HELLO2
  258.  
  259.      This name is used to create the control file for the project. The control 
  260.      file contains information about the project's language profile, associated 
  261.      options, and other attributes. The extension .PRJ is appended to the name 
  262.      you enter. The control file is stored in the WorkFrame/2 V1.1 home 
  263.      directory, C:\IBMWF. 
  264.  
  265.   4. Under Project Type, the Base project radio button is already selected. 
  266.      You do not need to change the setting. 
  267.  
  268.  The Hello2 Sample Project is considered a base project. A base project is used 
  269.  to build a single executable module (EXE), dynamic-link library (DLL), or 
  270.  similar object. 
  271.  
  272.  A composite project is a collection of sub-projects, that is, other base or 
  273.  composite projects, that allow you to build more complex applications.  For 
  274.  more information on composite projects, see the IBM WorkFrame/2 Introduction 
  275.  booklet and the WorkFrame/2* V1.1 online help. 
  276.  
  277.  
  278. ΓòÉΓòÉΓòÉ 4.2. Completing the Create a Project Window ΓòÉΓòÉΓòÉ
  279.  
  280. To complete the New Project window: 
  281.  
  282.   1. When you have completed the information in the New Project window, click 
  283.      on the More push button.  Another window appears where you can enter more 
  284.      information about your project. 
  285.  
  286.   2. In the Directory field, type: 
  287.  
  288.           C:\IBMCPP\WKFRAME\HELLO2
  289.  
  290.      This is the directory where the files are stored for the sample project. 
  291.      For this tutorial, the directory already exists. If you type the name of a 
  292.      directory that does not exist, the WorkFrame/2 product can create it for 
  293.      you. 
  294.  
  295.   3. In the Target file name field, type: 
  296.  
  297.           HELLO2.EXE
  298.  
  299.      The target file defines the object to be built by the project (usually an 
  300.      executable module or DLL). Later you can perform the Run and Debug actions 
  301.      on the project's .EXE file. 
  302.  
  303.   4. In the Make file name field, type: 
  304.  
  305.           HELLO2.MAK
  306.  
  307.      Note that you may have to delete or type over the text that initially 
  308.      appears in this field. 
  309.  
  310.      HELLO2.MAK is the name of the make file that is to be used to create the 
  311.      target file.  The HELLO2.MAK file does not exist yet, but is created later 
  312.      in this tutorial. 
  313.  
  314.   5. Leave the File mask field as it appears. 
  315.  
  316.      When you later open the project window, only files with names that match 
  317.      the file mask are displayed.  For example, if the file mask was *.c , only 
  318.      the files with the extension *.c would be displayed in the project window. 
  319.  
  320.   6. The Languages field is a combination box indicating the currently selected 
  321.      language from a list of available language profiles. 
  322.  
  323.      Select the arrow on the field to display the list of available languages, 
  324.      and select IBM C/C++ Tools from the list. 
  325.  
  326.      This associates things like the IBM* C/C++ Tools compiler, appropriate 
  327.      linker, and make utility with this project. 
  328.  
  329.  
  330. ΓòÉΓòÉΓòÉ 4.3. Finishing Project Creation ΓòÉΓòÉΓòÉ
  331.  
  332. To complete the project creation: 
  333.  
  334.   1. On the Create window, click on the OK button to create the project.  The 
  335.      new project appears in the Project Control window and a line is written in 
  336.      the Action Log indicating that the project was created. 
  337.  
  338.   2. Click on Cancel to close the New Project window. 
  339.  
  340.  If you had more projects to create you would have repeated the process for 
  341.  each project before closing the New Project window.  The example used in this 
  342.  document is very simple. Your own project would typically consist of multiple 
  343.  executable files. You would then define each executable as a base project and 
  344.  then collect all the projects together into one or more composite projects. 
  345.  
  346.  For more information on creating composite projects, please refer to the 
  347.  on-line help. 
  348.  
  349.  
  350. ΓòÉΓòÉΓòÉ 4.4. Setting Options for a Project ΓòÉΓòÉΓòÉ
  351.  
  352. You can set options for a project as you create it in the Create Project 
  353. window, or later from the Options pull-down menu after you have created and 
  354. opened the project.  In the case of the IBM* C/C++ Tools compiler, however, 
  355. special information for the linker is stored in the project file by the 
  356. compiler. Because of this, the project file must exist before compiler options 
  357. are set. Thus, you must finish creating the object before setting options for 
  358. it. 
  359.  
  360. Note:  Setting options for a project is optional, as defaults are provided. 
  361.        However, because neither the compiler nor the linker support debugging 
  362.        information by default, you must specify these options if you want to 
  363.        debug your program.  We will do this in the following steps. 
  364.  
  365.  
  366. ΓòÉΓòÉΓòÉ 4.5. Opening a Project ΓòÉΓòÉΓòÉ
  367.  
  368. Before setting any options for a project, you must first open it. 
  369.  
  370. To open the Hello2 Sample Project: 
  371.  
  372.   1. Select the Hello2 Sample Project project from the list of projects in the 
  373.      Project Control window 
  374.  
  375.   2. Then, click on the Open push button. The Hello2 Sample Project window 
  376.      appears. 
  377.  
  378.      You can also double-click on the project name to open it. 
  379.  
  380.  The Hello2 Sample Project window contains a list of all files that match the 
  381.  file mask.  The file mask *.* indicates that all files are displayed.  Because 
  382.  there is only one file in the sample project, only the HELLO2.C file appears. 
  383.  
  384.  
  385. ΓòÉΓòÉΓòÉ 4.6. Setting HELLO2 Compiler Options ΓòÉΓòÉΓòÉ
  386.  
  387. Now that the Hello2 Sample Project window is open, you can set the compiler 
  388. options for the HELLO2 project: 
  389.  
  390.   1. From the Options pull-down on the WorkFrame/2* V1.1 main window, select 
  391.      Compile options.  The IBM C/C++ Tools Compiler Options notebook appears. 
  392.  
  393.      Each page in the notebook corresponds to a category of processing options 
  394.      that are defined in the IBM C/C++ Tools Programmer's Guide.  To get help 
  395.      on any option in the notebook, focus on the control and press F1. 
  396.  
  397.   2. Select the Debugging tab in the notebook. 
  398.  
  399.   3. Select the Generate debugging information check box. 
  400.  
  401.   4. Now select the Other tab in the notebook. 
  402.  
  403.      The options in this page allow you to control such things as whether the 
  404.      char data type is signed or unsigned by default, and if the compiler 
  405.      should invoke the linker automatically. 
  406.  
  407.   5. Select the Perform compile only, no link check box. 
  408.  
  409.      This field indicates that you want the linker invoked as a separate step 
  410.      of the build process. 
  411.  
  412.   6. Select the OK push button in the note book to close the notebook and 
  413.      confirm the changes you have made. 
  414.  
  415.  
  416. ΓòÉΓòÉΓòÉ 4.7. Setting HELLO2 Link Options ΓòÉΓòÉΓòÉ
  417.  
  418. Now set the linker options for the HELLO2 project: 
  419.  
  420.   1. While the HELLO2 project window is still open, select Link options from 
  421.      the Options pull-down in the main WorkFrame/2* V1.1 window. The IBM* C/C++ 
  422.      Tools Linker Options notebook appears containing pages that represent 
  423.      categories of linker options. 
  424.  
  425.   2. Click on the Generation tab on the notebook. 
  426.  
  427.   3. Select the Include debug information check box on the first Generation 
  428.      page. to have the linker preserve the debug information. 
  429.  
  430.   4. Select the Window radio button from the Application Type group of radio 
  431.      buttons near the bottom of the page, if it is not already selected. 
  432.  
  433.      Selecting Window for the Application Type instructs the linker to generate 
  434.      a text-windowed application. By default, the linker attempts to build an 
  435.      application that does not use Presentation Manager* (PM) services into a 
  436.      text-windowed application. By explicitly selecting this option you 
  437.      eliminate a warning message at link time. 
  438.  
  439.   5. Close the Linker Options note book by selecting the OK push button. 
  440.  
  441.  
  442. ΓòÉΓòÉΓòÉ 4.8. Lesson 2: Summary ΓòÉΓòÉΓòÉ
  443.  
  444. In this lesson, you have learned how to: 
  445.  
  446.  o Create a base project, telling WorkFrame/2* about your project, where its 
  447.    files are, and what names you want to use for its parts 
  448.  
  449.  o Open a project, displaying its corresponding project window 
  450.  
  451.  o Associate the project with the IBM* C/C++ Tools compiler and debugger 
  452.  
  453.  o Specify some compile and link options that should be used when building the 
  454.    program. 
  455.  
  456.  
  457. ΓòÉΓòÉΓòÉ 5. Lesson 3: Changing a Source File ΓòÉΓòÉΓòÉ
  458.  
  459. In this lesson, you will invoke the editor to edit the HELLO2 project source 
  460. file.  While in the editor, you will add two syntax errors that will cause 
  461. compilation errors. 
  462.  
  463.  
  464. ΓòÉΓòÉΓòÉ 5.1. Editing the HELLO.C Source File ΓòÉΓòÉΓòÉ
  465.  
  466. To edit the HELLO2.C file: 
  467.  
  468.   1. Highlight the HELLO2.C file in the Hello2 Sample Project window and click 
  469.      on the Process push button (you can also double-click on the file name to 
  470.      edit it).  The editor is started and an editing window appears with the 
  471.      HELLO2.C file loaded. 
  472.  
  473.      The WorkFrame/2* installation program defines the Enhanced Editor (EPM) as 
  474.      the default editor to use.  You can specify that the WorkFrame/2 V1.1 
  475.      environment use your own editor.  For more information on integrating your 
  476.      own editor, see the on-line help. 
  477.  
  478.   2. Remove the trailing semicolon from the first printf statement.  This will 
  479.      cause the first compilation error. 
  480.  
  481.   3. Change return 0; to return i; 
  482.  
  483.      Because i is not defined, a second compilation error will occur. 
  484.  
  485.   4. Select Save and quit from the File pull-down in the editor. 
  486.  
  487.  
  488. ΓòÉΓòÉΓòÉ 5.2. Lesson 3: Summary ΓòÉΓòÉΓòÉ
  489.  
  490. You have learned how to invoke the editor for a project file from the Project 
  491. Control window. 
  492.  
  493. Note that highlighting a file name and clicking on Process (or double-clicking 
  494. on the name of the file) always invokes the editor unless the selected file is 
  495. an executable.  Executable files are run instead of edited. 
  496.  
  497.  
  498. ΓòÉΓòÉΓòÉ 6. Lesson 4: Creating a Make File ΓòÉΓòÉΓòÉ
  499.  
  500. This lesson describes the steps necessary to create a make file for a project. 
  501. You will use the Make File Creation utility to create a make file that performs 
  502. a compile and a link. 
  503.  
  504. Note:  You could also provide your own make file instead of creating one using 
  505.        the Make File Creation Utility. 
  506.  
  507.  The Make File Creation utility builds two files: 
  508.  
  509.   1. The first file is the make file itself.  This is the file that was 
  510.      specified when you created the HELLO2 project (HELLO2.MAK). 
  511.  
  512.   2. The second file is a dependencies file.  The dependencies file indicates 
  513.      the relationships between the project parts. 
  514.  
  515.  The Make File Creation utility assumes that you are working with the standard 
  516.  NMAKE.EXE and LINK386.EXE programs. If you are using a different make utility 
  517.  or linker, the output of this process could require modification, unless your 
  518.  own make utility or linker accepts the same input as the corresponding 
  519.  standard program. 
  520.  
  521.  
  522. ΓòÉΓòÉΓòÉ 6.1. Starting the Make File Creation Utility ΓòÉΓòÉΓòÉ
  523.  
  524.      From the Tools pull-down menu of the main WorkFrame/2* V1.1 window, select 
  525.      Make file creation. The Make File Creation window appears. 
  526.  
  527.  The top two list boxes contain the output of the Make File Creation process: 
  528.  
  529.  o The first list box contains the make file.  The name of the make file is 
  530.    determined by the name you specified in the Make file name field of the 
  531.    Create Project window when you created the project. 
  532.  
  533.  o The second list box contains the project dependency information. The 
  534.    dependency file name is created by WorkFrame/2 using the target file name as 
  535.    a model.  For this sample project, the dependency file name is HELLO2.DEP. 
  536.  
  537.  The remaining controls are used as input to the Make File Creation process. 
  538.  
  539.  You can change compile and link options for the open project here by selecting 
  540.  the Compile Options or Link Options push button.  For the purposes of this 
  541.  tutorial, leave the compile and link options as you specified when you created 
  542.  the project. 
  543.  
  544.  
  545. ΓòÉΓòÉΓòÉ 6.2. Selecting Make File Actions ΓòÉΓòÉΓòÉ
  546.  
  547. To create a make file, you will need to specify a set of actions to be 
  548. generated and a set of files to analyze: 
  549.  
  550.   1. Select Compile and Link from the Actions list box in the Make File 
  551.      Creation window. 
  552.  
  553.      Note:  The Make File Creation utility is also capable of generating 
  554.             statements in support of the IPF compiler, the resource compiler, 
  555.             and the message service utilities (MKMSGF and MSGBIND). See the 
  556.             on-line help for more information. 
  557.  
  558.   2. Select HELLO2.C from the files list.  This indicates that you want to 
  559.      create the make and dependencies file based on the HELLO2.C file. 
  560.  
  561.      Your project could contain hundreds of source files.  In this case, the 
  562.      Make File Creation Utility analyzes the list of files and makes 
  563.      assumptions about file types based on their extensions and the actions you 
  564.      selected. The Make File Creation Utility produces a make file and a 
  565.      dependency file for all the files selected. 
  566.  
  567.      If you did have hundreds of files to be included in the make file, you 
  568.      could select them all at once by double-clicking with mouse button one on 
  569.      the directory name that appears directly above the files list. The Make 
  570.      File Creation Utility is able to distinguish between valid and invalid 
  571.      files based on the actions you selected. 
  572.  
  573.  
  574. ΓòÉΓòÉΓòÉ 6.3. Starting the Make File Creation Process ΓòÉΓòÉΓòÉ
  575.  
  576. To start the make file creation process: 
  577.  
  578.   1. Click on the Start push button to begin the make file creation process. 
  579.  
  580.      You cannot perform further actions on the Make File Creation window while 
  581.      the Make File Creation process is running, although you can continue to 
  582.      perform tasks in other windows. 
  583.  
  584.      The Make File Creation process displays status information in a static 
  585.      field immediately below the Actions list.  Note that the status 
  586.      information appears very quickly for the sample project. 
  587.  
  588.      When the actions are complete you will hear an audible alarm. 
  589.  
  590.   2. Click on OK to save the make and dependency files and close the Make File 
  591.      Creation window. 
  592.  
  593.   3. In the Hello2 Sample Project window, click on the Refresh push button. 
  594.      The .MAK and .DEP files appear in the file list with your HELLO2.C file. 
  595.  
  596.  
  597. ΓòÉΓòÉΓòÉ 6.4. Lesson 4: Summary ΓòÉΓòÉΓòÉ
  598.  
  599. You have learned how to: 
  600.  
  601.  o Create a make file to use with the sample project 
  602.  
  603.  o Instruct the Make File Creation utility to build a make file that takes the 
  604.    source file and compiles it using the compile options associated with the 
  605.    project 
  606.  
  607.  o Instruct the Make File Creation utility to generate a link step and generate 
  608.    the target file that you specified when creating the project. 
  609.  
  610.  You were able to create the make and dependency files without knowing the name 
  611.  of the compiler or the linker, the syntax of their invocation strings, or the 
  612.  syntax of the make file. 
  613.  
  614.  
  615. ΓòÉΓòÉΓòÉ 7. Lesson 5: Making the Project ΓòÉΓòÉΓòÉ
  616.  
  617. This lesson describes how to invoke the NMAKE program, using the Make action 
  618. from the Actions pull-down on the main WorkFrame/2* V1.1 window.  NMAKE is a 
  619. compiling and linking aid that searches for files changed since the last 
  620. compile and recompiles only the changed files.  The NMAKE program is provided 
  621. with the OS/2* Developer's Toolkit. 
  622.  
  623. You will perform the make action against the files you created in the previous 
  624. lessons. 
  625.  
  626. When you perform the Make action on the sample project, compiler errors are 
  627. detected.  These are the errors that you added in Lesson 3: Changing a Source 
  628. File. The errors are highlighted in the output window.  You will fix the errors 
  629. by invoking the EPM editor directly from the NMAKE output window. The NMAKE 
  630. utility is invoked on the sample project again, and this time the process is 
  631. successful. 
  632.  
  633.  
  634. ΓòÉΓòÉΓòÉ 7.1. Invoking the Make Program ΓòÉΓòÉΓòÉ
  635.  
  636. To invoke the NMAKE program to perform a make action with the newly created 
  637. HELLO2.MAK make file: 
  638.  
  639.      Select Make from the Actions pull-down menu on the main WorkFrame/2* V1.1 
  640.      window. A monitor window appears, where the output of the make process is 
  641.      displayed. 
  642.  
  643.  When the process is complete you hear a low-pitched audible alarm indicating 
  644.  that an error has occurred. 
  645.  
  646.  
  647. ΓòÉΓòÉΓòÉ 7.2. Correcting the Errors ΓòÉΓòÉΓòÉ
  648.  
  649. There are a number of compiler error messages in the output window: 
  650.  
  651.   1. The two lines which contain compilation errors appear in the monitor 
  652.      window.  Select the first error message and double click on it to invoke 
  653.      the editor. 
  654.  
  655.      Note:  If you are not using the EPM editor, skip to step 4 of the 
  656.             following page, Getting Details on Errors and Functions 
  657.  
  658.   2. In the editor, the HELLO2.C file is displayed and the cursor is positioned 
  659.      on the line with the first error.  Select Describe error from the Compiler 
  660.      in the EPM editor pull-down to display the error message text for that 
  661.      error. 
  662.  
  663.  
  664. ΓòÉΓòÉΓòÉ 7.3. Getting Details on Errors and Functions ΓòÉΓòÉΓòÉ
  665.  
  666. Note that the Compiler pull-down in the EPM editor is only present when it is 
  667. invoked by double-clicking on errors in the monitor.  You can use the Compiler 
  668. pull-down to move between the two errors, selecting the Next error or Previous 
  669. error menu options.  This is particularly useful if there are a number of 
  670. errors in a program. 
  671.  
  672. Now try performing these tasks on the compiler errors in the source-code: 
  673.  
  674.   1. Click on the Details push button to see help for the error message that is 
  675.      highlighted in the Describe errors list. 
  676.  
  677.   2. Press the Esc key to close the help window, then click on the Cancel push 
  678.      button on the Describe Error window to return to the editor session. 
  679.  
  680.   3. Next, put the cursor on the printf statement and press Ctrl-h.  Help for 
  681.      the printf function appears. 
  682.  
  683.      You can invoke help within EPM for any language construct or function this 
  684.      way. 
  685.  
  686.   4. Close the help window then place the cursor on the first printf statement 
  687.      in the source file and add a semicolon to the end. 
  688.  
  689.   5. Put the cursor on the return i; statement and change it to return 0; 
  690.  
  691.   6. Select Save and quit from the File pull-down of the EPM editor to save the 
  692.      file and exit from the editor. 
  693.  
  694.  
  695. ΓòÉΓòÉΓòÉ 7.4. Performing a Successful Make ΓòÉΓòÉΓòÉ
  696.  
  697. Now that you have corrected the errors in the HELLO2.C file, you can try to 
  698. perform a successful make action: 
  699.  
  700.   1. Close the monitor window by clicking on the Cancel button. 
  701.  
  702.   2. Re-invoke the make process by clicking on Make from the Actions pull-down 
  703.      menu.  A new monitor window is started. When the process is complete, you 
  704.      hear a high-pitched audible alarm indicating that the make command was 
  705.      successful. 
  706.  
  707.   3. Click on the Cancel push button to close the monitor window. 
  708.  
  709.   4. Click on the Refresh push button in the Hello2 Sample Project window.  The 
  710.      target file HELLO2.EXE appears in the project window. 
  711.  
  712.  
  713. ΓòÉΓòÉΓòÉ 7.5. Lesson 5: Summary ΓòÉΓòÉΓòÉ
  714.  
  715. In this lesson, you: 
  716.  
  717.  o Invoked the Make utility 
  718.  
  719.  o Used the editor to correct compilation errors in the HELLO2 source-code 
  720.  
  721.  o Obtained help on error messages and library functions 
  722.  
  723.  o Re-invoked the Make process to successfully create the HELLO2.EXE target 
  724.    file. 
  725.  
  726.  You could use the IBM* C/C++ Tools debugger to debug a project that has 
  727.  errors. For detailed information on how to use the C/C++ Tools debugger see 
  728.  the IBM C/C++ Tools Debugger Introduction booklet or refer to its online help 
  729.  and tutorial. 
  730.  
  731.  
  732. ΓòÉΓòÉΓòÉ 8. Lesson 6: Running the Project ΓòÉΓòÉΓòÉ
  733.  
  734. This lesson shows you how to run the sample project. In order to run a project, 
  735. a project window must be open. Select Opening a Project to review the steps on 
  736. how to open a project. 
  737.  
  738. To run the Hello2 Sample Project: 
  739.  
  740.   1. Select Run from the Actions pull-down menu in the WorkFrame/2* V1.1 main 
  741.      window. 
  742.  
  743.      The WorkFrame/2 window becomes an icon, and a new window in which the 
  744.      program runs, is opened 
  745.  
  746.   2. Press Enter to end the program and close the window. 
  747.  
  748.  
  749. ΓòÉΓòÉΓòÉ 9. Lesson 7: Adding the Program to the Tools List ΓòÉΓòÉΓòÉ
  750.  
  751. In this lesson you will add the HELLO2.EXE program to your tools list. 
  752. Programs that appear on the tools list can be used as tools for other projects. 
  753.  
  754. This lesson describes two ways of adding a tool to the tools list. You can add 
  755. a tool by filling in the information in a New Tool window, (described in 
  756. Completing the New Tool Window), or you can add a tool by transferring 
  757. information from the project to the tools list (described in Adding a Tool by 
  758. Dragging a Project.) 
  759.  
  760.  
  761. ΓòÉΓòÉΓòÉ 9.1. Accessing the New Tool Window ΓòÉΓòÉΓòÉ
  762.  
  763. To access the Change Tools list: 
  764.  
  765.   1. Close the Hello2 Sample Project window by clicking on the Cancel push 
  766.      button. 
  767.  
  768.   2. Under the Configure pull-down menu from the action bar on the main 
  769.      WorkFrame/2* V1.1 window, click on Tools.  The Configure Tools window 
  770.      appears. 
  771.  
  772.   3. Click on the New push button to open the New Tool window. 
  773.  
  774.  
  775. ΓòÉΓòÉΓòÉ 9.2. Completing the New Tool Window ΓòÉΓòÉΓòÉ
  776.  
  777. To complete the New Tool window: 
  778.  
  779.   1. In the Program title field, type: 
  780.  
  781.           HELLO2
  782.  
  783.      This name appears as the title for the tool in windows, pull-downs, list 
  784.      boxes, and messages. 
  785.  
  786.   2. In the Path and file name field, type: 
  787.  
  788.           C:\IBMCPP\WKFRAME\HELLO2\HELLO2.EXE
  789.  
  790.   3. In the Startup directory field type: 
  791.  
  792.           . (a period)
  793.  
  794.      The period indicates that WorkFrame/2* should use the project directory as 
  795.      the current directory when the tool is started. 
  796.  
  797.   4. Leave the Invocation string field blank. 
  798.  
  799.      This field is required only if your application requires parameters on 
  800.      startup. The HELLO2 program does not require parameters on startup. You 
  801.      can specify an invocation string here, or you can indicate that you want 
  802.      to be prompted for the invocation string when the program starts. 
  803.  
  804.      If you want to be prompted, enter the text of the prompt in the Prompt 
  805.      string field and turn on the Prompt required check box. 
  806.  
  807.   5. Select Program determines as the Program type. 
  808.  
  809.   6. In the Execution mode field, the Foreground radio button is pre-selected. 
  810.      Accept the default Execution mode to indicate that you want the tool to 
  811.      run in the foreground. 
  812.  
  813.      The WorkFrame/2 product issues a call to DosStartSession to start the 
  814.      program.  If you choose to run the tool in the background, the tool must 
  815.      not require user interaction.  When it is run, it is invoked in a monitor 
  816.      window similar to the windows used when you invoked the Make process. 
  817.  
  818.   7. Click on the OK push button to add HELLO2 to the Tools list and close the 
  819.      New Tool window.  The Configure Tools window reappears. 
  820.  
  821.   8. Click on OK to close the Configure Tools list and accept the changes. 
  822.  
  823.  
  824. ΓòÉΓòÉΓòÉ 9.3. Adding a Tool by Dragging a Project ΓòÉΓòÉΓòÉ
  825.  
  826. If the tool you are adding is a WorkFrame/2* V1.1 project, you can use the 
  827. WorkFrame/2 V1.1 drag and drop feature to add the tool to the Tools List.  The 
  828. fields in the New Tool window are initialized based on the project selected 
  829. from the Project Control window. 
  830.  
  831. In this step, you will add the Hello2 Sample Project to the tools list again, 
  832. this time using the drag-drop method: 
  833.  
  834.   1. From the Configure pull-down menu from the the main WorkFrame/2 V1.1 
  835.      window, click on Tools. The Configure Tools window appears. 
  836.  
  837.   2. Click on New to open the New Tool window. 
  838.  
  839.   3. In the Project Control window, highlight Hello2 Sample Project. 
  840.  
  841.   4. Holding down mouse button two, drag the project to the New Tool window. 
  842.  
  843.   5. Release mouse button two once the pointer is positioned over any input 
  844.      field in the New Tool window.  The fields in the window are initialized 
  845.      with the characteristics of the Hello2 Sample Project. 
  846.  
  847.   6. For Program type, select the Program determines radio button. 
  848.  
  849.   7. In the Execution mode field, the Foreground radio button is pre-selected. 
  850.      Accept the default Execution mode. 
  851.  
  852.   8. Click on OK to add HELLO2 to the Tools list and close the New Tool window. 
  853.      The Configure Tools window reappears. 
  854.  
  855.   9. Click on OK to close the Configure Tools list and accept the changes. 
  856.  
  857.  
  858. ΓòÉΓòÉΓòÉ 9.4. Running the Tool ΓòÉΓòÉΓòÉ
  859.  
  860. Now try running the HELLO2 program from the Tools list: 
  861.  
  862.   1. Click on the Tools pull-down to verify that HELLO2 is now listed twice at 
  863.      the bottom of the menu. 
  864.  
  865.   2. Run HELLO2 by selecting it from the Tools pull-down menu. 
  866.  
  867.  
  868. ΓòÉΓòÉΓòÉ 9.5. Lesson 7: Summary ΓòÉΓòÉΓòÉ
  869.  
  870. In this lesson you learned how to: 
  871.  
  872.  o Add a program to the Tools list by completing the New Tool window yourself, 
  873.    or by using the drag and drop feature 
  874.  
  875.  o Run a program from the Tools list. 
  876.  
  877.  Note:  Although the tool has been added to your tools list, it is only valid 
  878.         for the current session. To save the tool so that it can be used in 
  879.         other sessions, you must save your user profile by selecting 
  880.         Save Settings Profile from the the File pull-down on the WorkFrame/2* 
  881.         V1.1 main window. 
  882.  
  883.  
  884. ΓòÉΓòÉΓòÉ 10. Lesson 8: Deleting the Project ΓòÉΓòÉΓòÉ
  885.  
  886. In this lesson you will delete the Hello2 Sample Project from the WorkFrame/2* 
  887. environment. 
  888.  
  889. The Hello2 Sample Project window must be closed (you already closed it in the 
  890. last lesson). If the project window is open, close it by clicking on Cancel. 
  891.  
  892.  
  893. ΓòÉΓòÉΓòÉ 10.1. Deleting the HELLO2 Project ΓòÉΓòÉΓòÉ
  894.  
  895. To delete the Hello2 Sample Project: 
  896.  
  897.   1. From the File pull-down menu on the main WorkFrame/2* V1.1, select 
  898.      Deletion window to open the Delete window. 
  899.  
  900.   2. In the Project Control window, select the Hello2 Sample Project entry. 
  901.  
  902.      You may have to move other windows so they do not hide the Delete window. 
  903.  
  904.   3. Holding down mouse button two, drag the project to the Delete window then 
  905.      release the mouse button. 
  906.  
  907.      A Confirm Deletion window appears. 
  908.  
  909.   4. Confirm the deletion by clicking on OK. Animation begins in the Delete 
  910.      window. 
  911.  
  912.      The Hello2 Sample Project is now deleted from the WorkFrame/2 V1.1 
  913.      environment.  However, the HELLO2 directory and all of its files still 
  914.      exist.  You can delete them later from the command prompt if you want. 
  915.  
  916.  Note:  You can also delete projects by highlighting them in the Project 
  917.         Control window and clicking on the Delete push button. 
  918.  
  919.  
  920. ΓòÉΓòÉΓòÉ 10.2. Disabling Animation and Sound ΓòÉΓòÉΓòÉ
  921.  
  922. If you want to disable the animation and sound: 
  923.  
  924.   1. Select Preferences from the Configure pull-down on the WorkFrame/2* V1.1 
  925.      main window. 
  926.  
  927.   2. Deselect the Animation check box to disable animation; deselect the Sound 
  928.      check box to disable sound. 
  929.  
  930.   3. Click on the OK push button to accept the changes and close the 
  931.      Preferences window. 
  932.  
  933.  
  934. ΓòÉΓòÉΓòÉ 10.3. Lesson 8: Summary ΓòÉΓòÉΓòÉ
  935.  
  936. In this lesson you learned how to: 
  937.  
  938.  o Delete a project from the Project Control window 
  939.  
  940.  o Disable animation and sound 
  941.  
  942.  
  943. ΓòÉΓòÉΓòÉ 11. Lesson 9: Closing the WorkFrame/2 Environment ΓòÉΓòÉΓòÉ
  944.  
  945. In this lesson, you will end your WorkFrame/2* V1.1 session. 
  946.  
  947.  
  948. ΓòÉΓòÉΓòÉ 11.1. Ending the WorkFrame/2 Session ΓòÉΓòÉΓòÉ
  949.  
  950. To end your WorkFrame/2* V1.1 session: 
  951.  
  952.   1. Select on Close from the system menu. 
  953.  
  954.      A confirmation window appears asking if you want to save the WorkFrame/2 
  955.      profile before ending the session. 
  956.  
  957.   2. Click on No in the confirmation window. This indicates that you do not 
  958.      want to save the information and files that were created using this 
  959.      tutorial. If you do want to save the files click on Yes. 
  960.  
  961.  
  962. ΓòÉΓòÉΓòÉ 11.2. Lesson 9: Summary ΓòÉΓòÉΓòÉ
  963.  
  964. In this lesson you learned how to end your WorkFrame/2* V1.1 session without 
  965. saving the changes that you made. 
  966.  
  967.  
  968. ΓòÉΓòÉΓòÉ 12. Tutorial Summary ΓòÉΓòÉΓòÉ
  969.  
  970. This tutorial has guided you through all the major steps of the development 
  971. process.  You should now be able to effectively use the WorkFrame/2* V1.1 
  972. environment. The WorkFrame/2 product itself offers some other tools and 
  973. features that could be of interest to you.  Use the online help and 
  974. documentation to familiarize yourself with the other features of this product, 
  975. and increase your productivity. 
  976.  
  977.  
  978. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  979.  
  980. Trademark of the IBM Corporation 
  981.  
  982.  
  983. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  984.  
  985. Each WorkFrame/2 V1.1 project has an associated language profile 
  986.  
  987. A language profile defines a number of things, including: 
  988.  
  989.   1. The executable files for the compiler, linker, debugger, and make utility 
  990.      to be used for the project 
  991.  
  992.   2. The DLLs that let you specify options for the above programs 
  993.  
  994.   3. The default invocation string (if applicable) for the make utility and 
  995.      debugger 
  996.  
  997.   4. Search paths for include files and libraries. 
  998.  
  999.  
  1000. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  1001.  
  1002. A linker is a program that resolves cross-references between separately 
  1003. compiled object modules, and then assigns final addresses to create a single 
  1004. executable program.