DevPartner 2018 Workshop : Maximize You Traditional Synergy Development with Visual Studio

Exercise 3: Object and Executable Library Projects

Previous Exercise Home Next Exercise

This is the third of a series of exercises that demonstrate the abilities of developing Traditional Synergy inside Visual Studio.

If you have not completed the previous exercises you can find the first one here.

This exercise will create a Traditional Synergy Object library and add source files to it. You will then create a Traditional Synergy Executable Library project which builds from the Object library.

To begin the exercise, follow these simple steps:

This will create an Object Library project.; After the project is created it will open up the Routine.dbl default program file.; Close this window.; We can also delete the default source file from the project:

To ensure the correct version of the software is built:

We are going to add a number of source files to the project.; These source files can be downloaded from here.; Download (when prompted by the browser select “open”) and open the zip file and copy the source files and all folders to the OnVinylObjectLibrary project folder you have just created.; This folder will be under the DevPartner2018 solution folder.

To add the source files to the project follow these steps:

This will add the source files to the project.; To ensure we are going to build the project correctly, on the menu bar ensure that the Solution Configuration is set the Debug and the Solution Platform is set the x64.

First we need to check/change the location of the created object library:

Now we can try to execute the build process.; At this point we expect the solution to fail to build and we will correct the issues:

Lots of errors, which is to be expected!

Out first task is to define where our repository structures are to be loaded from.; We need to define a reference between our Object Library and our Repository.; To define the project reference:

Now we can try to execute the build process:

Further errors that need to be corrected.; The code uses an environment variable called ONVINYL_INC which we need to define.; We shall use the concept of Common Properties so that all projects have access to the environment variables:

Now we can try the build again:

If the project fails to build this is usually an indication that Visual Studio needs to be restarted.; Shutdown and restart Visual Studio and reload the DevPartner2018 solution:

The next task is to create an Executable Library.; The Executable Library will be built from the Object Library:

This will create an Executable Library project.; After the project is created it will open up the Routine.dbl default program file.; Close this window.; We can also delete the default source file from the project:

To ensure the correct version of the software is built:

To build the Executable Library from the Object Library we simply need to reference the Object Library:

The final task is to define the logical that will be used by the runtime to locate the executable library when linked to a mainline program:

Check both the Error and Output windows: we have introduced a number of new errors.; To correct these we need to add an additional reference so that the build system can find the core UI Toolkit library:

  • At this point check that the dialog title includes the project name “OnVinylExecutableLibrary”.; If it does not, cancel the dialog and reselect the OnVinylExecutableLibrary project in the Solution Explorer
  • The project should now build successfully