[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.1.1.6 Dynamic Linking

On MacOS/X, MacOS/X Server 1.0 (Rhapsody), OpenStep, and NextStep, symbol management within plug-in modules (also known as dynamically loaded libraries) is handled differently than on most other platforms and operating systems. On most platforms, symbols are private to a plug-in module unless explicitly exported. On the Apple/NeXT platforms all symbols are public by default. This difference of symbolic semantics can have detrimental side-effects.

On other platforms, plug-in modules are themselves linked against any required static libraries in order to satisfy external symbolic references. On MacOS/X, MacOS/X Server 1.0 (Rhapsody), OpenStep, and NextStep, on the other hand, the application is typically linked against any libraries which may be required by plug-in modules rather than linking the plug-in modules, themselves, against the libraries. There are a couple problems with this approach.

The approach used by other platforms, where plug-in modules are linked directly against any static libraries which they require, has several advantages.

In order to avoid the fragility of the standard MacOS/X, MacOS/X Server 1.0 (Rhapsody), OpenStep, and NextStep dynamic linking model, and in order to avoid having to invent special case solutions to work around these problems, this port of Crystal Space attempts to emulate the model of dynamic linking used on other platforms. This is accomplished by linking plug-in modules against the static libraries which they require, rather than linking those libraries into the application.

The one major pitfall which makes employment of this approach difficult, is that of symbolic conflicts where the same symbol is defined in more than one place. This problem can occur when more than one plug-in module links with the same static library, and when both a plug-in module and the application link against the same static library. This port employs a couple different solutions to work around these problem depending upon the exact platform in question. These solutions are summarized below.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated using texi2html