|
||
Configuring the Compiler |
||
The dialog below is invoked through the TOOL COMPILE menu. It shows options that may be set for the SilverC compiler. The succeeding sections describe these options.
At the first invocation of the compiler or the COMPILE OPTIONS command, the SILVERC environment variable, if it exists, is consulted for compiler settings. Any options set by a COMPILE OPTIONS command invocation then override the SILVERC variable settings.
|
||
Treating Warnings as Errors Certain questionable, but legal constructs are flagged as warnings. If this flag is enabled, then the compiler will treat them as errors, meaning that the compilation will fail, and no executable file will be generated. Otherwise, the compilation will succeed, with potential errors. See Compiler Warning Situations for a description of the questionable constructs. The default setting for this flag is off.
|
||
Symbol Tables If this flag is enabled, then a symbol table will be written into the executable file, which may be useful if you use the debugging facilities provided by SilverC (stacktrace, #pragma monitor , etc.). Otherwise, no symbolic information will be written, which will make the size of the executable file smaller. The default setting for this flag is off.
|
||
Retaining the Error File SilverC compilation error information is written to a file named "__CBUG__.TXT", stored in the directory where the executable is to be written. Normally, the compiler deletes this file when it is no longer needed. If you desire that the compiler not delete this file (perhaps because you are using a different editor than the one included in SilverScreen), enable this flag. The format for errors and warnings stored in the error file is as follows:
W081: CALC.C(506): No previous declaration for function [fct] E005: CALC.C: Undefined function [fct]
Warnings are prefixed with 'W' , errors by 'E' . The error number, in decimal, follows, padded on the left with '0' , to 3 digits. The name of the file where the error was detected is included; if a line number is associated with the error, then it follows the file name in parentheses. The default setting for this flag is off.
|
||
Setting the Maximum Errors in a Compilation The SilverC compiler will halt compilation when a set number of errors is encountered. The compiler may generate inappropriate errors due to not recovering too well from previous errors, which you may find confusing. You might choose to set it to a lower number (for example, 1, which would cause the compiler to halt on the first error it encounters). By default, this number is 100.
|
||
Defining a Macro for the Preprocessor You may define a macro for the preprocessor with this facility. The macro may contain no whitespace, even inside a string. No error checking is performed. It is best to use this only to define simple macros, equivalent to:
#define BILL #define GEORGE 1
|
||
Specifying a Header File This facility allows you to cause the compiler to include a header file before proceeding with normal compilation, as if the source file contained:
#include <header file name>
before any ensuing source. If a header file so named is not found, an error will be generated.
|
||
Specifying Additional Include Directories The compiler, by default, searches for #included files first in the Silver execution path, then in the path where the SilverScreen executable resides. This facility allows you to force the compiler to consult other paths before looking in the default places. No error checking is performed. |