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 directory that one of the environment variables MOSEL, XPRESSDIR, or XPRESS point to. 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.
© 2001-2019 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.