Using the linker in Visual Studio

Command line options

The Silverfrost linker DBK_LINK, DBK_LINK2 or DBK_LINK4 (dependent on the version of the .NET Framework being targeted) is automatically invoked when you build an FTN95 project in Visual Studio or FTN95 Express. The form of the linker command line is hidden from the user but in exceptional circumstances it may be necessary to adopt command line options that are different from those that are supplied by default.

The linker command line options can be changed by using the Property Pages for the project. You can display the pages by clicking with the right mouse button on the name of the project in the Solution Explorer window and by selecting Properties from the popup menu.

Select Linker Options from the tree on the left hand side of the dialog.

The current Configuration and Platform are shown at the top of the dialog and these entries would not normally be changed.

Command line options are shown in tabular form. As you select each item, help information appears in the lowest rectangle.

For an MDL file, select Compiler Options from the left hand pane of this dialog and, in the Output File Type section, select MDL.

References to libraries

If a project makes calls to procedures that are located in a library then it is necessary to configure the linking command for the project so that the library is automatically linked in. Typically the library will take the form of another project within the current solution.

The connection is established by using the References tab within in the Solution Explorer window.

For the purposes of illustration let us create a library project within the current solution. To do this, click with the right mouse button on the name of the solution and select Add, New Project from the popup menu. Suppose this is called Project2. Now make Project2 into a .NET DLL by using the Property Pages. Select Compiler Options from the tree on the left of the Property Pages dialog for Project2 and change the Output File Type from EXE to DLL.

Now right click on the References for Project1

and select Add Reference.

In the dialog, select the Projects tab and double click on Project2. Close the dialog to complete the configuration process.

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited