Working with Projects

A program that uses more than one translation unit must be built from a Quincy Project, which is a file that lists the source code files and library files that the compiler and linker use to build the executable program.

You also use a Project to build a library file, which is a collection of compiled modules that can be linked into a program.

Setting Up a Project

To establish a project:

  1. Click the New tool button.
  2. Or choose the New command on the File menu.
  3. Quincy opens the New dialog shown here.

  4. Select the Project File entry in the New dialog.
  5. Click OK.
  6. Quincy opens the Project Properties dialog shown here.

  7. Enter the name of the target in the Target field. The target is either an executable program or an object library. Enter the file name with no file extension.
  8. Enter the path where the project file and its source code files will be located.
  9. Enter the working directory where the project will read and write its data files when you run or debug it from within Quincy.
  10. Select the radio button that identifies the kind of application the project builds.
  11. Click OK.

(You can modify all the project properties except for its path by choosing the Properties command on the Project menu when the project file is open in Quincy.)

A project is a document, and Quincy displays it alongside of the source code documents in the MDI window. Here is an empty project document.

Setting the Project's Options

  1. Ensure that Quincy's options are compatible with the target that the project builds. See Setting Options. Library files are usually built with debugging information disabled. Executable files that include library files must have the paths to those files programmed into Quincy's options.
  2. Click the Save tool button.
  3. Or press Ctrl+S.
  4. Or choose the Save command on the File menu.

If the Project file was saved earlier, Quincy writes the current version over the old one. If the Project file is a new one, Quincy opens the Save As dialog box shown above.

Adding Files To a Project

A Project file consists of a list of source code files and, optionally, library files. The source code files must be in the same folder with the Project file. The library files can be elsewhere.

To add a file to a Project.

  1. Select the Project file as the active window.
  2. If the Project already has files, select the file in front of which you want to insert the new files. If you want to append files to the list, select no files in the Project window. (To deselect a file, click anywhere in the empty part of the window.)
  3. The order of the files is important when you use libraries that refer to each other's object files. The linker makes only one pass. If you have circular references, you might need to list a library file more than once in the Project file.

  4. Press the Ins key.
  5. Or choose the Insert File(s) command on the Project menu.
  6. Quincy opens the Insert File(s) dialog shown here.

    Select one or more files from the list. If you are adding C or C++ source files, they must be in the same folder that contains the Project file. If you are selecting a library file, which has the extension .A, you can get it from any folder as long as Quincy's options have been set to permit the linker to find the library.

  7. Click the Open button to add the selected files to the Project.

Here is a project file with some source code files added. Quincy has the source code files open behind the project file, too.

Deleting Files From a Project

To delete files from a Project:

  1. Select the file(s) to be deleted in the Project window.
  2. Choose the Delete File(s) command on the Project Window.
  3. Or press the Del key.
  4. Quincy asks if you really want to delete the files.

  5. Click Yes.

Building a Project

Conditional Make of a Project's Target

  1. Select the Project file or one of its source code files.
  2. Click the Build tool button.
  3. Or Choose the Build command on the Project menu.

This procedure is a conditional "make" operation, which means that Quincy recompiles the source code files that have changed since the previous build. During the build operation, Quincy displays its status in the Build dialog shown here.

If any of the compile operations has errors, the Build dialog displays those errors as explained in Unsuccessful Build. You can double click an error message to open the source code file in the editor and position the insertion cursor on the line of source code that produced the error.

Rebuild All Parts of a Project

  1. Click the Build All tool button.
  2. Or select the Rebuild All command on the Project menu.

This procedure recompiles all the source code files listed as part of the project and then links the executable target or builds the library target if there were no errors.


<--previous page next page-->