Developing a traditional Synergy application

This topic includes the following sections:


Synergy DBL Integration for Visual Studio (SDI) includes support for traditional Synergy development. This means you can use Visual Studio to develop traditional Synergy libraries and executables for Windows, Linux, and OpenVMS. Note the following:

Development steps for traditional Synergy

The following steps outline the Visual Studio development process for a traditional Synergy application. Most of these steps are for Visual Studio procedures, so see Visual Studio documentation for more information.

1. Start by setting options for your Visual Studio environment. For example, you can control the behavior of the Visual Studio code editor (indentation, tab size, etc.), the way IntelliSense works for Synergy DBL files, and which file types are automatically treated as compile or content files. See Options for Synergy/DE projects for more information.
2. Create a solution for your application, and create projects for the mainline program, libraries, and (optionally) repositories for the application. To create these projects, use the following project templates:

For example, to create a program with a single .dbr file, select File > New Project in Visual Studio. Then select the "Traditional Application (DBR)" template. (You can use the New Project dialog's search field to find this.) See Synergy projects, solutions, and files for more information, and note the following:

3. Build out and configure your projects by setting project properties, adding code and other items, referencing other projects and files as necessary, setting environment variables, and setting up build configurations. For more information, see

Note the following:

4. Build the solution or an individual project by using a build or rebuild command in Visual Studio. For example, you can rebuild the entire solution by selecting Build > Rebuild Solution from the Visual Studio menu. Note the following:

The Visual Studio Error List (View > Error) lists any errors encountered in the build. You can filter this list so that it is limited to the current project (which can be very helpful), the current document in the editor, or all documents open in the editor. You can also use the search feature for the Error List to find specific words or phrases in the list, and you can filter out errors, warnings, or messages. To clear only Synergy-related errors and warnings from the Error List, select Tools > Clear Error List from the Visual Studio menu.

5. Debug the project or solution. To debug a project or solution, it must be built in Debug mode. See Debugging traditional Synergy with Visual Studio for more information, and note the following:

Adding code and other items

You can add a new or existing item (a code file, a text file, etc.) by right-clicking the project node in Visual Studio's Solution Explorer and selecting one of the following from the context menu: Add > New Item, Add > Existing Item, or Add > Reference Existing Item. (The Add > Existing Item command copies the file into the Visual Studio project. Add > Reference Existing Item adds a relative-path reference to the item.) Note the following:

Referencing projects and files

References enable a project to use other projects (libraries and repositories) and external files. Referencing a library is equivalent to linking to a library — i.e., adding a library to a dblink command — when developing outside of Visual Studio.

You can add a reference by right-clicking the Reference node in Visual Studio's Solution Explorer and selecting Add Reference from the context menu. Note the following:

Linux development

For Linux, there are two Visual Studio development paths:

In either case, use the same project templates you would use for Windows (see step 2 above). And be sure to use the linux32 or linux64 platform target (see Adding a Linux or OpenVMS platform for traditional Synergy). These platform targets cause Visual Studio to compile the projects as if they were compiled on a Linux system — e.g., code marked with OS_UNIX is included.

Keep in mind that Linux is case sensitive, so when you define environment variables or specify paths or filenames, make sure the case is correct.

To debug a Linux application, you'll need to run the application on a Linux machine and then use remote debugging to debug the application from Visual Studio, or use standard traditional Synergy debugging on the Linux machine. See Debugging traditional Synergy with Visual Studio for more information.

OpenVMS development

For OpenVMS, you can develop and build with Visual Studio in Windows, and you may also be able to run and debug your code on Windows, but you will not be able to deploy files built in Visual Studio. For final deployable builds, you will need to move the code you developed in Visual Studio to an OpenVMS development machine.