| 3441 | #endif |
| 3442 | |
| 3443 | bool isLibraryLoaded(const char* lib_path) { |
| 3444 | #if !defined(__linux__) && !defined(__APPLE__) && !defined(_WIN32) && !defined(__FreeBSD__) |
| 3445 | #error Port me! |
| 3446 | #endif |
| 3447 | |
| 3448 | void* dlobj = nullptr; |
| 3449 | |
| 3450 | #if defined(__unixish__) |
| 3451 | dlobj = dlopen(lib_path, RTLD_NOLOAD | RTLD_LAZY); |
| 3452 | #else |
| 3453 | dlobj = GetModuleHandle(lib_path); |
| 3454 | #endif |
| 3455 | |
| 3456 | return dlobj != nullptr; |
| 3457 | } |
| 3458 | |
| 3459 | void* loadLibrary(const char* lib_path) { |
| 3460 | #if !defined(__linux__) && !defined(__APPLE__) && !defined(_WIN32) && !defined(__FreeBSD__) |