Compile page of Visual Studio project properties (traditional Synergy)
Use the Compile page of project properties in Visual Studio to specify compile settings for a traditional Synergy project.
To access this page, select a project node in Solution Explorer, select Project > Properties from the Visual Studio menu, and then select the Compile tab.
Compiler command line
This non-editable area of the page displays traditional Synergy compiler options that correspond to settings selected on this page.
Compiler settings
Set the warning level (-W)
Select this option and select one of the following to control warnings:
0 | Don't generate any warning messages. |
1 | Display severe warnings. |
2 | Display level 1 warnings plus certain less severe warnings, such as warnings about hiding class members. |
3 | Display level 2 warnings plus certain less severe warnings, such as warnings about expressions that always evaluate to true or false. |
4 | Display all level 3 warnings plus informational warnings. |
Compiler warning levels are specified on the page for each individual error.
Disable specified warnings (-WD)
To disable warnings, select this option and specify the error numbers for warnings you want to disable. To specify multiple error numbers, separate numbers with commas.
Convert specified warnings to errors (-WE)
To have the compiler report some warnings as errors, select this option and specify the error numbers for the warnings in this field. To specify multiple warnings, separate numbers with commas. Note that warnings specified in the "Disable specified warnings" field will not be reported as errors or warnings.
Enable .NET compiler warnings (-qnet)
If checked, specifies that .NET compiler warnings are turned on for items that are not supported for Synergy .NET. These include deprecated data types, syntax, APIs, compiler options, and alignment warnings. Warnings are output to standard error.
Generate errors for all compiler warnings (-qerrwarn)
Select this to change compiler warnings into errors.
Set compile-time defines (-qdefine)
To define one or more identifiers and assign a replacement value to each, use the following syntax in this field:
identifier=replacement
Replacement can be a number or a quoted string. And you can specify multiple identifier=replacement pairs by separating them with commas:
ident_1=value_1,ident_2=value_2
Quotation marks that are to be part of replacement must be escaped by prefixing them with the backslash character. For example:
val="\"hello\""
Note that this is similar to using .DEFINE in code, but settings here apply to the entire compilation unit (not just a routine).
Relax strong prototyping validation (-qrelaxed)
If checked, specifies that strong prototype validation is relaxed: alphanumerics are allowed in unary plus operations, sizes larger than the maximum are allowed on decimal and implied-decimal fields, and EXITE can exist without a RETURN. You can control which additional compiler checks are relaxed with one or more of these options:
- :allowdup – Allow a duplicate structure in a namespace and duplicate routines imported from prototypes. This is required for projects that have prototype-only references, and it is required for projects that reference projects with prototype-only references. It is also required when compiling multiple sources that have the same global structures. See Creating a prototype-only reference for more information.
- :deprecate – Allow deprecated syntax to pass: implied-decimal, implied-numeric, or implied-packed data types on a channel and function calls that begin with $.
- :end – Make END statement clear .DEFINEs at the end of the routine instead of at the end of the file.
- :extf – Don't check External function declarations against the return type of the function.
- :interop – Compile classes generated by the gennet40 utility. Identifiers longer than 30 characters are truncated instead of generating a warning. Note that this option prevents the project from being debugged.
- :local – Relax error reporting on local routine prototype checking.
- :optval – Allow optional ^VAL arguments (which are supported only on OpenVMS).
- :param – Allow passing type a to an output n or type d to an input or unspecified direction a.
- :paramad – Allow passing type a to an input or unspecified direction d.
- :paramst – Allow passing a non-CLS structure (without objects) to a parameter whose type is another non-CLS structure of the same size.
- :path – Help with ambiguous paths.
Default behavior for COMMON statements (-qexternal or -qglobal)
Use this to determine how COMMON statements that are not set to GLOBAL or EXTERNAL will be treated. Select Global to treat them as global commons. Select External to treat them as external commons.
Default behavior of unqualified record statements (-qstack, -qstatic, or -qlocal)
Use this to set the default for unqualified RECORD statements (i.e., RECORD statements that don't specify STACK, STATIC, LOCAL, CONST, or READONLY). See RECORD-ENDRECORD for more information.
Stack | Makes the contents of a record unique for each activation of the routine. |
Static | Makes the contents of a record persist throughout the life of the program. |
Local | Makes the contents of a record persist throughout the life of the program. |
None | No default for unqualified RECORD statements. |
Define alternate compile-time ^VARIANT (-v, -qvariant)
To define the ^VARIANT data reference operation, select this option and enter a value in the field. The default value is 0.
Align data on native system boundaries (-qalign)
Select this to align integer types and alpha types greater than 64 bytes to a native int boundary in unnamed records. In addition, all other records and global commons will be aligned to a native int boundary. This option is selected automatically if the "Enable .NET compiler warnings (-qnet)" option is selected.
Concatenate source files (-qconcat)
Select this to concatenate source files when compiling. Note that unresolved path problems due to imports may occur.
Convert all decimal type arguments to numeric (-N, -qdecargs)
Select this to convert all decimal type arguments to numeric.
Define all routines as re-entrant (-E, -qreentrant)
If checked, specifies that all routines in the files being compiled can be re-entered. (You can also specify the REENTRANT modifier on the FUNCTION and SUBROUTINE statements for those routines.)
Define all undefined functions as ^VAL (-X, -qimplicit_functions)
If checked, specifies that undefined external functions should automatically be defined as ^VAL functions.
Enable bounds checking (-qcheck for debug, -qstrict for release)
If checked, specifies that bounds checking is enabled:
- In debug mode, this invokes bounds checking to enforce array dimensions and string sizes to prevent subscripting off the end of an array or string. It converts all pseudo arrays to real arrays, converts all arguments to real arrays, checks all subscript ranging and dimension access to make sure it does not exceed the descriptor of the variable passed, and gives an error when memory used for one of the following goes out of scope or is released: %SSC_BIND, %SSC_DEFINE, %SSC_OPEN, %RCB_INSARG, %RCB_SETARG, or %RCB_SETARGS.
- In release mode, this enforces strict bounds checking on real array access.
This option is selected automatically if the "Enable .NET compiler warnings (-qnet)" option is selected.
Refresh data from the disk between invocations of each routine (-r, -qrefresh)
Refresh data from the disk between invocations of each routine.
Require prototype usage (-qreqproto)
By default the compiler does not check parameters for calls to unprototyped subroutines or calls to functions defined as EXTERNAL from other compilation units. Additionally, it treats non-EXTERNAL functions in other compilation units as ^VAL functions if the "Define all undefined functions as ^VAL (-X, -qimplicit_functions)" option is selected. However, if "Require prototype usage (-qreqproto)" is selected, the compiler validates all routines against prototypes (except routines call by XSUBR), and "Not found" errors are generated for routines that are not prototyped. It also causes the compiler to ignore all EXTERNAL function designations and the "Define all undefined functions as ^VAL (-X, -qimplicit_functions)" option. Prototyping enables the compiler to perform full parameter checking, and it enables IntelliSense to display parameter information correctly.
Note that with this option
- routines called with XSUBR are not validated against prototypes.
- prototype-only references are required to resolve "not found" errors for calls from libraries early in the build order to higher-level libraries (libraries later in the build order) — e.g., circular references. For more information, see Creating a prototype-only reference.
If you use a routine that you do not develop or maintain and that is not prototyped, you will not be able to use this option.
Set FIND statements to lock found records by default (-F)
Select this to have FIND statements default to locking found records. If this option is not specified, Synergy DBL does not lock the record unless the LOCK qualifier is specified.
Trim trailing null arguments (-T)
If checked, specifies that trailing null arguments should be removed from a subroutine or function call.
Use alternate form of IF (-a, -qaltif)
Select this option to use the alternate, non-ANS DIBOL form of the IF statement, which specifies that the THEN is optional and the ELSE belongs to the last IF statement. (The ANS DIBOL form of the IF statement specifies that each ELSE belongs to the most recent THEN in the same lexical level.) For more information, see IF-THEN-ELSE.
Compile source files into separate object files (may be less performant)
If checked, each source file in the project is compiled into a separate DBO when the project is built. (If this is not selected, all source files are compiled into a single DBO.) Selecting this option can improve performance when the project is rebuilt for minor changes, but it can result in longer build times when the entire project must be rebuilt.
Other options
Enter additional compiler options you want set. See Traditional Synergy compiler options for information on options you can specify in this field. If you specify more than one option in this field, separate options with a space, as you would on the command line.