This structure centralizes:
- file discovery (try user path, then GEMC install
lib/, then build/ for test runs),
- opening the library using
dlopen, and
- closing the library using
dlclose in the destructor.
Search strategy
Given a library name or path:
- Try the provided value as-is.
- If not found, try
${GEMC_ROOT}/lib/<name>.
- If still not found, try
${GEMC_ROOT}/build/<name> (useful for Meson tests in the build tree).
Error reporting
Errors are reported via the configured GLogger instance using:
- ERR_DLNOTFOUND when no file is found, and
- ERR_DLHANDLENOTFOUND when the file exists but
dlopen returns null (with dlerror text).
Definition at line 50 of file gdl.h.