Open topic with navigation
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 desktop and server systems. (For information on limitations to Linux and OpenVMS development, see Development steps for traditional Synergy below.)
Note the following:
For information on moving existing traditional Synergy code into Visual Studio, see the document Migrating Traditional Synergy Projects to Visual Studio in the Resource Center on the Synergex website.
The following steps outline the process for creating a new traditional Synergy application from Synergy project templates. Note the following:
Most of the following steps are for Visual Studio procedures, so see Visual Studio documentation for more information.
|1.||Set options for your Visual Studio environment. For example, you can control the behavior of the Visual Studio code editor and the way IntelliSense works for Synergy DBL files. See Options for Synergy/DE projects.|
|2.||In Visual Studio, use the following project templates to create a project for each program and library in your application. (You can combine multiple mainlines into a single project by using the Multiple Mainline project template.)|
For example, to create a traditional Synergy program with a single .dbr file, select File > New Project, select Synergy/DE from the Installed Templates area of the New Project dialog, and then select “Traditional Application (DBR)” from the list of project types. You’ll need to set a few options for the project (name, location, and so forth) in the New Project dialog; then click OK. See Synergy/DE project templates for more information on these templates, and note that you can also create a project for repositories used by your program (see Using Synergy/DE repositories in Visual Studio).
If no solution is open in the current instance of Visual Studio, creating a project will also create a solution to contain the project. To add the project to an existing solution, open the solution in Visual Studio before you create the project (e.g., before you select File > New Project from the menu).
|3.||Add code and other items to your projects. For example, you can add a new code file by right-clicking the project node in Solution Explorer and selecting Add > New Item from the context menu. Note the following:|
|4.||Add references to other projects or files as necessary. References enable a project to use other libraries, and you can use references for repositories. Referencing a library is equivalent to linking to a library (i.e., equivalent to 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 Solution Explorer and selecting Add Reference from the context menu. Note the following:|
Note that prototype-only references are required to resolve calls from libraries early in the build order to higher-level libraries (libraries later in the build order)—i.e., circular references. However, these references are not supported for classes and class members. See Creating a prototype-only reference for more information.
|5.||Set environment variables needed for developing or running the application. Environment variables can be set in the environment, synergy.ini, synuser.ini, the Environment Variables page of Project Designer, and the Common Properties page of Project Designer. See Environment variables and Visual Studio development.|
|6.||Set project properties, which include settings for building (compiling). See Common project settings below for information on commonly used properties. See Synergy/DE project properties for details on project settings.|
For example, if the project is for Linux or OpenVMS development, select linux32, linux64, or vms as the "Platform target" on the Build page of project Designer. For information on adding a platform configuration for one of these platforms rather than setting the "Platform target" option directly (e.g., to build for both Windows and OpenVMS), see Adding a platform configuration below.
|7.||Build a project or the entire solution by using a Build or Rebuild option in Visual Studio. For example, you can rebuild the entire solution by selecting Build > Rebuild Solution from the Visual Studio menu.|
|8.||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.
If you have an existing project you want to port to Linux or OpenVMS, you can use the Visual Studio Configuration Manager to create a configuration that targets Linux or OpenVMS.
|1.||Open Configuration Manager (e.g., select Build > Configuration Manager from the Visual Studio menu) and select New from the “Active solution platform” drop-down list.|
|2.||In the New Solution Platform window, select linux32, linux64, or vms in the "Type or select the new platform" field, and select x64 or x86 for the "Copy settings from" option.|
|3.||Make sure the “Create new project platforms” option is selected, and click OK. Then, in the “Project contexts…” table, select the new platform for each project in your solution (see figure 3).|
You can now select the new solution platform when you build the solution and when you set options in Project Designer (e.g., on the Build page). For the example illustrated in figure 3, the new solution platform (linux32) would be available when building Application6 in Debug mode (i.e., when the Debug configuration is selected) and when setting options for the Debug configuration in Project Designer.
Visual Studio’s Project Designer enables you to set project-level settings (i.e., project properties), and it enables you to set environment variables. The following are some of the most commonly used features in Project Designer. Other pages and settings are available for Synergy projects. See Synergy/DE project properties for more information.
The Application page enables you to configure various application-level settings for a project.
Note that if your code files have INCLUDE statements that don’t specify a path (e.g., INCLUDE myfile.def), you’ll need to set the "Working directory" option to the directory with the included files (e.g., the directory with myfile.def).
See Application page, Project Designer (traditional Synergy) for more information.
The Build page enables you to configure build settings for a project.
See Build page, Project Designer for more information.
The Compile page enables you to set compiler options for a project. See Compile page, Project Designer (traditional Synergy) for more information.
The Debug page enables you to set debugging behavior for a project. See Debug page, Project Designer for more information.
Environment Variables page
The Environment Variables page enables you to set project-specific environment variables that are used at build time. Locations specified by environment variables set here are used to populate the Synergy tab of the Reference Manager for Visual Studio. See Environment Variables page, Project Designer.
Common Properties page
The Common Properties page enables you to set environment variables that are used at build time and that can be applied to any project in the solution. Locations specified by environment variables set here are used to populate the Synergy tab of the Reference Manager for Visual Studio. See Common Properties page, Project Designer.