Initializing help system before first use

Creating a DSO

From the operating system point of view, a module is a dynamic library (Dynamic Shared Object, DSO). The name of this DSO is the name of the module with the file extension .dso. For instance, assuming we have written a file test.c to implement the module testmodule, the DSO will be called testmodule.dso. To build this DSO, under Linux the following compilation command should be used:

gcc -shared -D_REENTRANT -I${MOSEL}/include test.c -o testmodule.dso

Similarly for Unix (Sun Solaris):

cc -G -D_REENTRANT -I${MOSEL}/include test.c -o testmodule.dso

The corresponding command under Windows:

cl /MD /LD /Fetestmodule.dso /I%MOSEL%\include test.c

Example makefiles are provided with the module examples in the Mosel distribution.

Mosel looks for the DSOs in the directory dso under the installation directory of Mosel (see Section 2.3.1 Directive uses of the Mosel Language Reference for further detail). If user-written DSOs are placed in a different directory, the environment variable MOSEL_DSO needs to be set to their location(s). The MOSEL_DSO is expected to be a list of paths conforming to the operating system conventions.