www.riscos.com Technical Support:
This chapter provides an overview of the most productive way to work with the desktop tools to produce your programs. The chapter Installing Acorn C/C++ describes how to prepare your working environment.
Acorn C/C++ includes the following tools:
Note that as DDT has to be capable of stopping RISC OS dead at any point in a program, for breakpoints, single stepping, etc, it cannot multitask under the RISC OS desktop.
Each of the tools listed above is described in more detail in its own chapter later in this volume. The language specific tools are described in the language user guides accompanying this manual.
As well as performing individual tasks, several of the desktop tools cooperate in ways designed to enhance your productivity. An example of this is throwback. When a language compiler or assembler detects an error in a program source file, it can cause throwback - opening a SrcEdit window for immediate correction of the offending program line. Another example of cooperation is the ability to drag an output file from one desktop tool to the input of another appropriate desktop tool.
The desktop tools are divided into two categories - interactive and non-interactive. The non-interactive tools are those that have options set and then are run, without any further interaction with you until the task completes or is halted. The interactive tools are those that operate with constant interaction with you, such as the source editor SrcEdit.
In the list of tools above, the first three (DDT, Make and SrcEdit) are interactive tools, and the rest are all non-interactive. The chapters describing each tool are organised into parts of this manual describing each category of tool. The non-interactive tools all have similar user interfaces, and the features common to all of them are described in the General features.
Many of the desktop tools require you to specify file or directory names. The interactive tools each have file types that they 'own', which you can double click on in directory displays to start activities. These are:
None of the non-interactive desktop tools own a file type. Input files are specified to these tools by dragging them to their icon bar icons from a directory display or by typing their names into a writable icon in a dialogue box or menu field. When typing filenames into a writable icon, enter absolute filenames such as:
To reduce the amount of typing required, any writable icon on a dialogue box that accepts a filename or directory name can be set by dragging a filename from a directory display to it. For example, dragging a filename from a directory display to the Files writable icon on the Link SetUp dialogue box adds it to the list of input files already specified:
Many program source files and Makefiles contain filenames, for example in an assembler program line such as:
RISC OS provides only one current directory, but many tasks (such as assembly processes) can be multitasking, running at the same time. Thus the concept of work directory is used in Acorn C/C++. This can be considered rather like a current directory for each task, and file searching is performed relative to this. See the section on each tool to see the way the work directory is set and used by that tool. Most of the simpler tools do not require a work directory.
The desktop tools support two main styles of working - managed and unmanaged development. These differ only in the way you construct your finished programs from sources, not the way you write or debug them, and you can mix and match the two styles as you wish.
Managed development makes use of Makefiles to manage the construction of your finished programs. A Makefile is a 'recipe' for processing your sources and linking the object files produced to form the usable program. The tools Make and AMU can both execute the commands in a Makefile running other tools to perform a make job. The tool Make also constructs Makefiles for you, avoiding the need for you to understand their syntax, and making it quick and easy to do this. The main advantages of managed development are: timestamps of files are examined during a make job and no unnecessary reprocessing of unaltered program sources is performed; programs are constructed consistently, following the same recipe each time, even when run by different people. These advantages make managed development the best style for the development of larger programs with source split into several source files.
Unmanaged development makes use of each individual tool directly to process the files as required to construct your programs. This can offer the quickest way of constructing small programs.
When Booting for unmanaged development you have to load each tool that you wish to use, but when Booting for managed development you only need to load Make (or AMU).
When working in either style, it is recommended you place each program project in a separate subdirectory, in the same way that the program examples are arranged. You can place the source, header and object files in suitable subdirectories of the project directory. See the accompanying language specific manuals for more details of subdirectory conventions. Source may be placed elsewhere, but this can make it more difficult to rename or move whole projects to other directories or filing systems.
If you have studied this chapter in detail you now understand how to construct a simple runnable program from text sources. You may now wish to load various desktop tools and experiment with their use, and there are further chapters that may provide useful general information.
Each desktop tool, such as the text editor SrcEdit and debugger DDT, has a chapter describing it, either in this user guide or in one of the accompanying manuals. If you intend to make much use of any particular tool, its chapter may prove useful reading next.
A large number of the desktop tools are classified as 'non-interactive', and have similar interfaces. The General features covers the interface features of this class of tool.