Project Maintenance

Once you have created a project, you may have to change it to reflect the changes in your project organization. You can:

Add new file-inclusion directives to your source files.

Add new source, object, or library files.

Delete obsolete files.

Move modules within the list.

Change compiler and linker options.

Change options for individual modules.

When you add a new include directive to a source file, you add a new dependency between files. For the most accurate builds, you need to regenerate include depen-dencies for the project.

·To regenerate include dependencies:

1.From the Project menu, choose Edit Project.

2.Turn on the Set Include Dependencies check box.

3.Choose Save List.

PWB regenerates the include dependencies for the entire project and rewrites the project makefile.

·To add new files to an existing project:

1.From the Project menu, choose Edit Project.

2.For each file that you want to add to the project:

A.Select the file from the File List box, or type the name of the file in the File Name text box.

B.Choose the Add / Delete button to add the file.

3.Choose Save List to rewrite the project makefile, set up the dependencies, and add the commands for the new files.

To see how to add the SETARGV.OBJ file to the COUNT project, see “Adding a File to the Project”.

·To delete files from a project:

1.From the Project menu, choose Edit Project.

2.For each file that you want to remove from the project:

A.Select the file from the File List box, or type the name of the file in the File Name text box.

B.Choose the Add / Delete button to remove the file from the list.

3.Choose Save List.

With most programming languages, you won't need to move modules within a project. However, some languages or custom projects require files to be in a specific order. If you're programming in Basic, for example, you must place the main module of your program at the top of the list. Unlike other languages, Basic does not define an explicit name where execution begins. Entry to a Basic program is defined by the first file in the list.

·To move a file to the top of the project file list:

1.From the Project menu, choose Edit Project.

2.Select the file you want to move to the top of the list.

3.Choose the To Top of List button.