INF: Creating a Project with Multiple Directories

ID Number: Q83229

1.00

WINDOWS

Summary:

For a large project, it is often desirable to store source and object

files in different directories. This can't be done with Microsoft

QuickC for Windows (QC/Win) version 1.0; however, it can be done by

building the project file in the directory of the intended object

files.

More Information:

To use QC/Win to maintain a project with multiple directories, first

build the desired directory structure. For purposes of this example,

the following directory structure is used:

Main project directory: \TEST

Source code: \TEST\SOURCE

Object files: \TEST\OBJ

More directories may be used if needed (for header files, and so on),

but the resulting files (.OBJs, DLLs, .EXEs, and so on) are all placed

in the project directory. .OBJ and .EXE files cannot be placed into

different directories using QC/Win. In this case, all source files

(.C, .H, .DEF, and other files) will be placed in the source

directory.

The steps are as follows:

1. Create the source files in the \TEST\SOURCE directory.

2. From the Project menu, choose Open.

3. Type the name of your project file (for example, TEST.MAK) in the

File Name box.

4. In the Directories box, select the \TEST\OBJ directory.

5. Choose OK to create a new project. This creates the project file in

the OBJ directory, and allows the resulting files to also go into

this directory.

6. In the Edit Project box, make the selections required to include

the desired files from the source directory in your project list.

This should include all .C, .H, .DEF, .RC, .CUR, .DLG, and other

files that are dependencies for your project.

7. Build the project.

This method will place the makefile (TEST.MAK) in the \TEST\OBJ

directory. All of the .OBJ files, and the .RES and .EXE files, will

also be in this directory.

Projects built using QuickCase:W (QCase:W) have a makefile created for

them. This file is in the directory where the .WIN file was created.

Normally this is the source code directory. To modify this project to

use separate source and object directories, move the makefile to the

desired project directory (as stated above) and edit it as follows:

1. Enter QC/Win and open the project by choosing Open from the Project

menu. Enter the name in the File Name edit box and choose OK.

2. From the Project menu, choose Edit.

3. The Project list box lists any project files that currently reside

in your project. Add all of the files associated with your project

to the list. These files will all be located in the source

directory. You may want to leave the files presently in the list to

indicate which files still need to be added. The files that are

presently in the list are no longer valid because the project file

was moved to a different directory. When adding these files, a

dialog box may appear resembling the following:

You can only add one Module-Definition file. Would you like to

replace the current file?

Choose OK because there is only one DEF file allowed per project.

This dialog box will also appear for duplicate resource files.

6. When all of the files have been added, review the project list and

delete any duplicate items (files incorrectly shown as being

located in the object directory).

7. Build and maintain the project normally.

Additional reference words: qcwin project build directory obj source 1.00