Silverfrost Logo About Us | Contact Us

Using the linker from a command line

With version 6.35 and above of FTN95 two versions of DBK_LINK are available, DBK_LINK2 and DBK_LINK4. DBK_LINK2 should be used when targeting version 2.0 (note that versions 3.0 and 3.5 of the .NET framework are actually extensions to the core of 2.0) and DBK_LINK4 should be used when targetting version 4.0 of the .NET Framework. Note that when using DBK_LINK4, the switch /CLR_VER 4 should also have been used on the command line for FTN95. Options on the command line for DBK_LINK2 and DBK_LINK4 are the same.

As of version 6.35, support for version 1.1 of the .NET Framework has been removed and DBK_LINK now only produces an error message indicating 1.1 is no longer supported.

The linking command takes the form:

DBK_LINK2 [options] [<output>.(EXE|DLL|MDL)] <file1>[.DBK] [<file2>[.DBK] ...]



DBK_LINK4 [options] [<output>.(EXE|DLL|MDL)] <file1>[.DBK] [<file2>[.DBK] ...]


[options] can be omitted. A list of options can be obtained by issuing the command




For information about MDL files see Signing an Assembly.

Any options can be followed by the name of the executable or DLL. If this is omitted, the first of the following list of .DBK files is used to provide the name of the executable or DLL. There must be at least one .DBK file in this list.

As an alternative to a .DBK file you can provide one .RES file in the list. A .RES file is output by the Silverfrost Resource Compiler SRC using a standard resouce script as input together with the /R command line switch. If you include a .RES file in this list then you cannot have a RESOURCES section in your FTN95 program (see Resources in FTN95).

In the simplest case a single file called MYPROG.F95 can be separately compiled and linked by using the following two commands:




An alternative form for the linking command is

DBK_LINK2 @filename


DBK_LINK4 @filename

where filename is the name of a file that contains the command line arguments.



Displays the list of options.
/HELP is an alternative for /?.

Specifies a different name for the global class. The default name is the name of the executable or DLL without its extension. This name is case sensitive. The option can also be used on the FTN95 command line when FTN95 is used with /LINK.
e.g. /CC:BloggsInc.SuperLib.Graphics.
/CC is short for /CONTAINING_CLASS.

Suppresses the Silverfrost copyright message
/NB is short for /NO_BANNER.

Makes the default base class not 'sealed'.
/NS is short for /NOT_SEALED.

Includes Assembly1 etc.<N> in the list of assemblies used in the search for external routines. e.g. /R:isymwrapper.dll;system.dll
/R is short for /REF.
Note that /REF must not reference a DLL via the global assembly cache (GAC). DLLs in the GAC should have alternative copies in a corresponding "redist" folder. Use the "redist" version and not the GAC version with /REF.

Turns off all messages that are not error messages.
/S is short for /SILENT.

/STACK:<decimal size>
<DECIMAL number>Sets the hardware stack size for the executable. The default is 96MB.
Note that you cannot set the stack size for a DLL. It must be set in the executable that drives the DLL. If this is an FTN95 executable then you can use /STACK on the executable. If it is a C# executable then you can use the Microsoft utility called EditBin to adjust the hardware stack size after C# compilation (in this case the default is 1MB). Stack usage is dominated by local arrays. It can be reduced by making the arrays dynamic (ALLOCATABLE) or by applying the SAVE attribute.

Sets the version number for the exe or dll.
e.g. /V:
/V is short for /VER.



Copyright © 1999-2017 Silverfrost Limited