Initializing help system before first use

Compiling and storing modules

Unless they are static, modules have to be compiled as dynamic libraries for the host operating system. The following table recalls the minimum set of options to use with the default C compilers for the supported operating systems. We assume here that the file mymodule.c contains the source of the module ``mymodule'' and that the environment variable MOSEL points to the installation directory of Mosel.

Linux:

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

Solaris:

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

Windows:

 cl /MD /LD /I%MOSEL%\include /Femymodule.dso mymodule.c

The resulting DSO file has to be stored either in the dso directory of the Mosel installation or in a location that the environment variable MOSEL_DSO points to (this variable is defined in a similar way as the PATH environment variable, i.e. it is a list of directories).

Note that modules may also be written in C++. In this case, the initialization function has to be declared as a standard C function in order to be located by Mosel (this is not required for static modules).

Example:

 extern "C" {
  DSO_INIT mymodule_init(XPRMnifct nifct, int *interver, int *libver,
                         XPRMdsointer **interf)
  {
  ...
  }
 };

© 2001-2020 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.