See Challenges of shared library environments, Part 2, why and when this is necessary to use.
This reimplements atexit
as it should be, just under a different name.
Release Version | Release Notes | AI Documentation |
---|---|---|
RELEASENOTES | DeepWiki for mulle-atexit |
You must statically link the mulle-atexit library with your executable. Ensure that global symbols are exported and that the whole library is linked to the executable and not optimized away by the linker.
Platform | Linker Flags |
---|---|
Linux | -Wl,--export-dynamic -Wl,--whole-archive |
macos | -force_load |
Use mulle-sde to add mulle-atexit to your project:
mulle-sde add github:mulle-core/mulle-atexit
To only add the sources of mulle-atexit with dependency sources use clib:
clib install --out src/mulle-core mulle-core/mulle-atexit
Add -isystem src/mulle-core
to your CFLAGS
and compile all the sources that were downloaded with your project.
Use mulle-sde to build and install mulle-atexit and all dependencies:
mulle-sde install --prefix /usr/local \
https://github.com/mulle-core/mulle-atexit/archive/latest.tar.gz
Preferably install mulle-core and be done with it:
Requirements | Description |
---|---|
mulle-core | 🌋 Almagamated library of mulle-core + mulle-concurrent + mulle-c |
Or if you really want to do it exhaustively:
Requirements | Description |
---|---|
mulle-thread | 🔠Cross-platform thread/mutex/tss/atomic operations in C |
Download the latest tar or zip archive and unpack it.
Install mulle-atexit into /usr/local
with cmake:
PREFIX_DIR="/usr/local"
cmake -B build \
-DMULLE_SDK_PATH="${PREFIX_DIR}" \
-DCMAKE_INSTALL_PREFIX="${PREFIX_DIR}" \
-DCMAKE_PREFIX_PATH="${PREFIX_DIR}" \
-DCMAKE_BUILD_TYPE=Release &&
cmake --build build --config Release &&
cmake --install build --config Release
Nat! for Mulle kybernetiK