mirror of
https://github.com/qmlnet/qmlnet.git
synced 2026-05-21 06:45:32 -06:00
Let native callbacks be defined in shared libraries on *nix platforms.
This commit is contained in:
parent
074ff2a093
commit
5efb489fc6
1 changed files with 2 additions and 1 deletions
|
|
@ -27,7 +27,8 @@ static void* getExportedFunction(const char* symbolName) {
|
|||
FARPROC symbol = GetProcAddress(library, symbolName);
|
||||
return (void*)symbol;
|
||||
#else
|
||||
void* dll = dlopen(nullptr, RTLD_LAZY);
|
||||
void* dll = dlopen(nativeModule.isNull() || nativeModule.isEmpty() ? nullptr : nativeModule.toLocal8Bit(),
|
||||
RTLD_LAZY);
|
||||
void* result = dlsym(dll, symbolName);
|
||||
dlclose(dll);
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue