Link

 

The parameters contained within the Links section are used for the linking of pre-compiled libraries (including MATLAB related libraries) and object files.

Additional Library (*.lib) and Object (*.obj/*.o) Files

This input field allows you to specify external static library (*.lib) and object (*.obj) files, which must be linked to the project before compilation.  Object and library files would normally be used if you have a lot of custom models associated with user written subroutines, where it would be more efficient to create a library or object file rather than maintain a collection of Fortran source files.

 

 

Object and library files provide a way to avoid the compilation of user written subroutines every time they are used in different projects.  They are also useful for sharing custom models with others, where you do not want to share the source code itself.

User Libraries Folder Method

A compiler specific folder convention exists for the purpose of specifying compiler specific object and library files.  Object and library files can be compiled with one or more different Fortran compilers, and then placed in a named sub-folder within the specified User Libraries Folder.  Then, the user may freely switch between compilers without the need to re-specify the files.

 

The user must manually add these sub-folders to the main folder specified by the User Libraries Folder option (in the Dependencies category of the Application Options dialog).  Each sub-folder represents a specific Fortran compiler, and the same library or object file (compiled by the corresponding compiler) may be placed.  Since there are different types of Fortran compilers that may be used with PSCAD, there can be different sub-folders specified. These must be named as follows:

For example, if a user specifies C:\my_libs as the User Libraries Folder, and intends to use either the GFortran compiler or the Intel Visual Fortran 9 compiler, then two sub-folders should be added to 'my_libs' as shown below:

 

 

Any library or object files required should be created by using the corresponding compiler, and then added to the corresponding sub-folder.

 

When entering a relative path to the file, the user must specify the a key to both the User Libraries Folder as well as the compiler sub-folder. For example, if a user specifies C:\my_libs as the User Libraries Folder and is using the Intel Visual Fortran compiler, entering "$(LibDir)\$(Compiler)\test.obj" as shown below would indicate that the specified file is located at C:\my_libs\if9\test.obj.

 

Absolute Path Method

Files may also be referenced by either an absolute or relative path specification.  If this method is chosen, then the folder specified in the User Libraries Folder will be overridden.  For example, a file referenced with an absolute path may appear as follows:

 

NOTE: Although it is not a necessity, the absolute path should appear within quotes.  This will ensure that if any spaces exist in a path directory or the filename itself, it will be parsed properly.

Entering Multiple Files

When entering multiple files into this field, they must be separated with a space, a comma or a semicolon.  Both User Libraries Folder and Absolute Path methods may be used simultaneously:

 

Wildcard Character

The wildcard character (i.e. *) is also supported. For example, entering the following:

 

 

Will ensure all *.obj files in the folder temp, will be included in the project build and make.

Supported File Types

This input field will only accept the following compiled file types:

MATLAB

The input parameters involved here are outlined below.

 

Link This Simulation with the Currently Installed MATLAB Libraries

Select this option if you intend to utilize the MATLABĀ®/SimulinkĀ® interface with this project.  Note that this option is disabled unless you have specified a MATLABĀ® version in the Dependencies category of the Application Options dialog.