Now that you have created your application, you must build the code so that you can execute the application. This process requires the following steps:
The first step in preparing to build your application, is generating the C++ code. This two-part process includes generating the code for your part source and for the main() function.
Generating the Source Code for Your To-Do List Application Visual Part:
To generate the C++ source code for your visual part, select File, Save and generate, and Part source, or select the Part Code Generation tool on the tool bar. When the files are generated, close the Composition Editor.
VisualAge generates the following files in the working
directory:
| This file... | Is the... |
|---|---|
| todolist.cpp | C++ code for your ToDoList part. |
| todolist.hpp | C++ header file for your ToDoList part. |
| todolist.h | Resource header file for your todolist.cpp file. |
| todolist.rci | Resource file for your todolist.rcx file, which will be created when you generate source code for your main() function. |
Generating the Source Code for Your To-Do List Application main() Function:
To generate the source code for your main() function, you must first create a main() part.
Next you must place the To-List part in the new ToDoMain part and make connections.
Select File, Save and generate, and then Part
source, or select the Part Code Generation tool on the tool
bar. VisualAge generates the following files in the working
directory:
| This file... | Is the... |
|---|---|
| ToDoMain.cpp | C++ code for your ToDoMain part. |
| ToDoMain.hpp | C++ header file for your your ToDoMain part. |
| ToDoMain.h | Resource header file for your ToDoMain.cpp file. |
Building your application consists of compiling and linking. To build your application, do the following:
To run your application, do the following:
Once your application is running, experiment with it to make sure it works as you designed it.
You can add a finishing touch to your application by creating a program object in OS/2 or a shortcut in Windows. Once you have done this, you can run your application by simply double-clicking on the program object or shortcut you just created.
If you created the simple To-Do List and would like to create the advance application, go to Enhancing the Simple To-Do List Application.
If you would like to exit the VisualAge, go to Exiting the Composition Editor.
