Creating DLL Projects

All in-process simulators are implemented as dynamic linked libraries (DLLs). The following describes the procedures that you need to perform in order to create a DLL project in conjunction with the source files generated by SansGUI.

Creating DLL Projects

We recommend the following naming convention and project location for your new DLL projects:

Suppose you have generated MySim version in the working directory MySim, the contents of the MySim directory will look like:


Directory or File



Simulator project directory


Schema Definition file


Object Library generated for version


Backup of Schema Definition prior to the Object Library version generation


Source file directory, created by SansGUI Source Code Framework


Sample source file in C for class Base.MyClass


Sample source file in Fortran for class Base.MyClass


Other source files


Simulator DLL directory


Simulator DLL workspace created by IDE


Other simulator DLL project files without source code


Debug build directory, will not be used


Release build directory of the simulator DLL


The simulator DLL built for software release


Manually created directory for debugging and tracing


The simulator DLL built for debugging and tracing

Microsoft Visual C++ IDE

To create a new DLL project in MSVC, do the following:

Compaq Visual Fortran IDE

To create a new DLL project in CVF, do the following:

Inserting Source Files

After the DLL project workspace is created, the next step is to insert the generated source files for the classes in the simulator into the project. To do so, use Project>AddToProject>Files... to locate and select the generated source files. Once you are done, click on the OK button to insert the files.

If you use a single programming language, include all the source files with the associated extension. If you use multiple programming languages in a cooperative IDE, such as MSVC and CVF, you can insert the appropriate source files with the extensions associated with the languages on a class-by-class basis. Normally, we recommend that you implement all the functions in a class in the same language. If you really need to implement the functions of the class in mixed programming languages, you will need to manage multiple source files for that class manually. You also need to incorporate other source files or libraries that your simulator will use in the project workspace.

Building Simulator DLL

Because the SansGUI source code framework generates skeleton code for the class functions, you can immediately build the simulator DLL with all the functions returning SG_R_OK.


C:\FH_Suite\htmlgifs\home.gif Preparing Development Environments Implementing Class Behavior

SansGUI Modeling and Simulation Environment Version 1.2

Copyright 2000-2003 ProtoDesign, Inc. All rights reserved.