Compile a SIMPL+ Module


To turn your SIMPL+ module into a runnable program, you need to compile and link the code. Compiling the code puts it together into libraries (.dll file), linking it uses the information in these libraries to build a program.

The compiler is optimized not to recompile a module during the build process once it is has been compiled successfully, so SIMPL+ Modules are only compiled if the module has been changed since the last successful compilation. To force your SIMPL+ module and all included libraries to be recompiled, choose the Recompile All option.

To compile your SIMPL+ Module:

When a SIMPL+ module is compiled, an Output Window tool window appears at the bottom of the screen. The Output Window displays information about the results of the save, compile, and update process that just occurred.

Compiling SIMPL+ modules results in the creation of several output files which are saved both in the module's project folder and into a temporary folder called SPlsWork. The following files are created:

 

The SIMPL+ Module's project directory:

Module_name.usp  -  SIMPL+ User Module

Module_name.ush  -  SIMPL+ User Module Header File (File is created upon SIMPL+ Module compilation)

 

SPlusWork Directory:

Module_name.dll  -  SIMPL+ Module Library File (Remains after a successful compilation)

Module_name.inf  -  SIMPL+ Module Information File  (Remains after a successful compilation)

S2_Module_name.spl  -  SIMPL+ intermediary file  (Remains after a successful compilation)

S2_Module_name.h  -  SIMPL+ intermediary file  (Remains after a successful compilation)

S2_Module_name.o  -  SIMPL+ intermediary file  (Remains after a successful compilation)

 

Conditions under which SIMPL+ modules from the Central Database are compiled in Crestron Studio®:

• If the module assembly does not exist in the local project’s SplsWork folder, the USP source file from the Central Database serves as the input to the SIMPL+ compiler which will build the module in the local Project’s SplsWork folder.

• If the timestamp of the USP source file in the Central Database is greater than the timestamp of the module in the local Project’s SplsWork folder, the module will be rebuilt.

• If dependent SIMPL+ components delivered in include4.dat have version changes compared to the data captured at compile time in the project’s local SplsWork folder, the module will be rebuilt.

• If the USP references any SIMPL# Library, it is automatically rebuilt.

Crestron modules follow the same rules as modules in the Central Database.

 

More:

SIMPL+ Editor

SIMPL+ Module/Program Structure

SIMPL+ Editor - Output Window

Create a SIMPL+ Module