Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
DynamicLibrary.hpp File Reference

Open a shared library and take a symbol out of it. More...

#include <dlfcn.h>
Include dependency graph for DynamicLibrary.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  esengine
namespace  esengine::core

Functions

void * esengine::core::openLibrary (const char *path)
void esengine::core::closeLibrary (void *handle)
void * esengine::core::librarySymbol (void *handle, const char *name)

Detailed Description

Open a shared library and take a symbol out of it.

Three lines of platform per operation, and every place that needs them writes the same three. Two do now — the Steamworks flat API, which carries no Valve header on purpose, and the compiled systems a native host loads — and a third copy is how they start to differ about RTLD_LOCAL or about what a null handle means.

Header-only and free of the engine, so a host, a harness or a tool can use it without linking anything.

It does NOT throw and does NOT log: what a failed open means is the caller's, since a missing Steam library is a feature nobody bought and a missing systems module is a build that cannot run.

Definition in file DynamicLibrary.hpp.