Alias OpenModel allows you to use your own memory allocation library. To do this, you must take the sample memory allocation code (Common/examples/memory.c++) and make changes as outlined in the file so that it references your memory library. Then all that is necessary is that you link with this modified memory.o and your memory library rather than -lapi_memory.
In memory.c++ the variable alignment_size is defined. It must be present and it must be initialized to zero. OpenModel will change it if necessary.
OpenModel includes a library of image retrieving routines. This library is quite large and as a result it was decided to separate it into its own library. OpenModel applications which do not do any work with images (image planes, textures, environments, etc.) may link with image_stubs.o rather than -lapi_image.
Unlike memory.c++, image_stubs.c is not an example implementation of an API, and is not meant to be changed by developers except perhaps to change the debugging messages. The only purpose to image_stubs.c is to decrease the size of an OpenModel application that does not need image support.
The OpenModel libraries are supplied in two forms on Irix platforms, as a static library, libalias_api.a and as a dynamic shared object (DSO) libalias_api.so. OpenAlias applications will always use dynamic linking. Under OpenModel when should the static library be used?
Linking with static versus DSO libraries produces different types of executables. Statically linking the Alias API libraries to a program actually attaches all of the Alias routines to the executable. This will significantly increase the size of your application since you are in effect, including a simplified version of Alias in the program. Statically linking a program has the advantage that no other files are required to run the executable. This may simplify the distribution of the OpenModel program when it is to be used on other machines.
Dynamically linking with DSOs requires that the .so libraries be available when the program is run. Using DSOs often decreases the loading time of the application since the libraries are not loaded until they are actually needed. It significantly reduces the size of the application (by over 30megabytes). If multiple copies of the application are run, they can reuse the same library, so only one copy will need to be in memory at once (note: each copy will be run as if it were an entirely separate application, this does not imply that each copy will use the same data). However, you must ensure that the LD_LIBRARY_PATH environment variable is set to include the path to the Alias DSO libraries.