User`s manual

Dynamic C Users Manual digi.com 325
16. PROJECT FILES
In Dynamic C, a project is an environment that consists of opened source files, a BIOS file, available
libraries, and the conditions under which the source files will be compiled. Starting with Dynamic C 9.30,
the File Open directory last used will be stored in the project file
i
. Projects allow different compilation
environments to be separately maintained.
16.1 Project File Names
A project maintains a compilation environment in a file with the extension .dcp.
16.1.1 Factory.dcp
The environment originally shipped from the factory is kept in a project file named factory.dcp. If
Dynamic C cannot find this file, it will be recreated automatically in the Dynamic C exe path. The factory
project can be opened at any time and the environment changed and saved to another project name, but
factory.dcp will not be changed by Dynamic C.
16.1.2 Default.dcp
This default project file is originally a copy of factory.dcp and will be automatically recreated as such
in the exe path if it cannot be found when Dynamic C opens. The default project will automatically
become the active project with
File|Project...|Close.
The default project is special in that the command line compiler will use it for default values unless
another project file is specified with the -pf switch, in which case the settings from the indicated project
will be used.
Please see Chapter 15 for more details on using the command line compiler.
16.1.3 Active Project
Whenever a project is selected, the current project related data is saved to the closing project file, the new
project settings become active, and the (possibly new) BIOS will automatically be recompiled prior to
compiling a source file in the new environment.
The active project can be factory.dcp, default.dcp or any project you create with
File | Project... | Save As... When Dynamic C opens, it retrieves the last used project, or the default project
if being opened for the first time or if the last used project cannot be found.
If a project is closed with the
File | Projects... | Close menu option, the default project, default.dcp,
becomes the active project.
i. If DC is started with a cwd (current working directory) other than the exe directory, the cwd will be used
instead of the one saved in the project file. This can happen if Dynamic C is started from a Windows
shortcut with a specified “starts in” directory.