1dynload_overview(3) Coin dynload_overview(3)
2
3
4
6 dynload_overview - Dynamic Loading of Extension Nodes
7
8 When Coin tries to get hold of a node type object (SoType) for a class
9 based on the name string of the node type, it will - if no such node
10 type has been initialized yet - scan the file system for a dynamically
11 loadable extension node with that given name. This can be completely
12 disabled by setting the environment variable COIN_NO_SOTYPE_DYNLOAD to
13 a positive integer value, new from Coin v2.5.0.
14
15 On UNIX, extensions nodes are regular .so files. On Win32, extension
16 nodes are built as DLLs. On Mac OS X systems, extension nodes are built
17 as .dylib files. (Note: The extension nodes have to be built using the
18 flag '-dynamiclib', not '-bundle'.)
19
20 Whether the dynamically loadable objects should be named with or
21 without the 'lib' prefix is optional. Both schemes will work.
22
23 People don't usually program in a way so that they instantiate new
24 nodes through the node class' SoType object, but that is the way nodes
25 are created when model files are loaded. This means that for all Coin
26 applications that load model files, the custom extension nodes will
27 automatically be supported for the model files without you having to
28 modify their source code and rebuild the applications.
29
30 See ftp://ftp.coin3d.org/pub/coin/src/dynloadsample.tar.gz for an
31 example using two dynamically loadable extension nodes. You only use an
32 examiner viewer to view the two extension nodes in action.
33
34 Only a limited set of C++ compilers are supported as of yet. This is
35 because, to initialize the extension node, it is necessary to know
36 something about how the C++ compiler mangles the initClass symbol. If
37 we don't know that, there is no way to locate the initClass method in
38 the library, which means the extension node can not make itself known
39 to the type system.
40
41 If your C++ compiler is not supported, the source file to add support
42 for a new compiler in is src/misc/cppmangle.icc. It is fairly trivial
43 to add support for new compilers, but if you don't understand how, just
44 ask us about it. Patches with support for new compilers are of course
45 very welcome.
46
47 See also
48 SoType
49
50 Since
51 Coin 2.0
52
53Version 4.0.0 Wed Jul 19 2023 00:00:00 dynload_overview(3)