coin_dynload_overview(3)
β¨ NAME β¨
coin_dynload_overview β she's the section (3) page whose entire ~main character~ thing is Dynamic Loading of Extension Nodes π¦β¨
π DESCRIPTION π
okay so bestie, here's the tea β: when Coin is trying to get hold of a node type object (SoType) for a class, and it's going off the name string of that node type β and no such node type has been initialized yet β it will go scan the file system looking for a dynamically loadable extension node with that given name. π
Full detective mode. And if you're sitting there like "no thank u", you can completely disable the whole vibe by setting the environment variable COIN_NO_SOTYPE_DYNLOAD to a positive integer value. That's new from Coin v2.5.0, iykyk. π
π what even IS an extension node, file-wise
- On UNIX, extension nodes are regular
.sofiles πΈ - On Win32, extension nodes are built as DLLs
- On Mac OS X systems, extension nodes are built as
.dylibfiles π
β οΈ note, and this one MATTERS: the extension nodes have to be built using the flag-dynamiclib, not-bundle. literally do not get this wrong bestie π
Whether the dynamically loadable objects should be named with or without the "lib" prefix is optional. Both schemes will work. both. it's giving flexible. π«Ά
πΈ the plot twist that makes this iconic
People don't usually program in a way so that they instantiate new nodes through the node class' SoType object β but that is the way nodes are created when model files are loaded. π
Which means: for all Coin applications that load model files, the custom extension nodes will automatically be supported for the model files, without you having to modify their source code and rebuild the applications. no source edits. no rebuild. it just works. ate. π β¨
π§ the example, go look at it
See ftp://ftp.coin3d.org/pub/coin/src/dynloadsample.tar.gz for an example using two dynamically loadable extension nodes. You only use an examiner viewer to view the two extension nodes in action. π
π the sad part (compiler support)
Only a limited set of C++ compilers are supported as of yet. Why? Because to initialize the extension node, it is necessary to know something about how the C++ compiler mangles the initClass symbol. If we don't know that, there is no way to locate the initClass method in the library, which means the extension node can not make itself known to the type system. and that's just tragic, fr fr ππ
If your C++ compiler is not supported, the source file to add support for a new compiler in is src/misc/cppmangle.icc. It is fairly trivial to add support for new compilers β but if you don't understand how, just ask us about it. π«Ά Patches with support for new compilers are of course very welcome. π
π See also
SoType
β Since
- Coin 2.0
and that's the whole page, bestie β this was Version 4.0.10, dated Thu Jun 25 2026 00:00:00, brought to you by the coin_dynload_overview(3) girlies ππ stay loaded, stay dynamic β¨
π¦ where this page comes from
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms