User`s manual

Dynamic C Users Manual digi.com 327
16.4 Command Line Usage
When using the command line compiler, dccl_cmp.exe, a project file is always read. The default proj-
ect, default.dcp, is used automatically unless the project file switch, -pf, specifies another project file
to use. The project settings are read by the command line compiler first even if a -pf switch comes after the
use of other switches, and then all other switches used in the command line are read, which may modify
any of the settings specified by the project file.
The default behavior given for each switch in the command line documentation is with reference to the
factory.dcp settings, so the user must be aware of the default state the command line compiler will
actually use. The settings of default.dcp can be shown by entering dccl_cmp alone on the com-
mand line. The defaults for any other project file can be shown by following dccl_cmp by a the project
file switch without a source file. The command:
dccl_cmp
shows the current state of all default.dcp settings. The command:
dccl_cmp -pf myProject
shows the current state of all myProject.dcp settings. And the command:
dccl_cmp myProgram.c -ne 25 -pf myProject
reads myProject.dcp, then compiles and runs myProgram.c, showing a maximum of 25 errors.
The command line compiler, unlike Dynamic C, never updates the project file it uses. Any changes desired
to a project file to be used by the command line compiler can be made within Dynamic C or changed by
hand with an editor.
Making changes by hand should be done with caution. Use an editor that does not introduce carriage
returns or line feeds with wordwrap, which may be a problem if the global defines or any file pathnames
are lengthy strings. Be careful to not change any of the section names in brackets or any of the key phrases
up to and including the “=.”
If a macro is defined on the command line with the -d switch, any value that may have been defined within
the project file used will be overwritten without warning or error. Undefining a macro with the -d- switch
has no consequence if it was not previously defined.