Creating a prototype-only reference

Prototype-only references (sometimes called proto-only references) are special references to specific DBL source files (rather than to projects with source files). These references are supported only for traditional Synergy. They can be used to temporarily resolve circular references. (Ideally, however, code with circular references should be restructured so that prototype-only references are no longer necessary.)

Visual Studio IntelliSense does not work with circular references (i.e., two libraries that reference each other), and you cannot use circular references for build dependencies. If your traditional Synergy code has circular references, you will need to add prototype-only references to reference the source files that contain the routines called by forward references (i.e., routines in higher-level libraries). For example, if ELB1 has a forward reference to ELB2, you would add a prototype-only reference in the ELB1 project, and this reference would be to the ELB2 source file that contains the called routine.

Note

Prototype-only references are not supported for Synergy .NET, so code that depends on these references must be restructured before it can be moved to Synergy .NET. See Preparing Existing Code for Synergy .NET.

Prototype-only references are not supported for files with classes or class members. In some cases, the syn2vs conversion utility adds prototype-only references to files with classes and class members. Replace these with project references. (See the document Migrating Traditional Synergy Projects to Visual Studio in the Resource Center on the Synergex website for information on syn2vs.)

The :allowdups setting for the "Relax strong prototyping validation (-qrelaxed)" compiler option must be set for projects with prototype-only references. It must also be set for projects that reference projects with prototype-only references. See Compile page of Visual Studio project properties (traditional Synergy) for information on this option.

To create a prototype-only reference,

1. Right-click the Prototypes node in Solution Explorer.
2. Select Add Prototype Reference, and then use the Add Existing Item dialog to select the Synergy DBL code file you want to reference.
3. Use the Add Existing Item dialog to select the Synergy DBL code file that has the routine you want to reference.