mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-15 05:11:27 +03:00
fix uni link when mac service started, by use
applicationShouldOpenUntitledFile delegate
This commit is contained in:
27
main.cc
Normal file
27
main.cc
Normal file
@@ -0,0 +1,27 @@
|
||||
#include <dlfcn.h>
|
||||
#include <iostream>
|
||||
|
||||
int main()
|
||||
{
|
||||
void *handle = dlopen("../Frameworks/liblibrustdesk.dylib", RTLD_LAZY);
|
||||
if (!handle)
|
||||
{
|
||||
std::cerr << "Cannot open library: " << dlerror() << '\n';
|
||||
return 1;
|
||||
}
|
||||
|
||||
// use dlsym to get a symbol from the library
|
||||
typedef int (*some_func_t)();
|
||||
some_func_t some_func = (some_func_t)dlsym(handle, "rustdesk_core_main");
|
||||
const char *dlsym_error = dlerror();
|
||||
if (dlsym_error)
|
||||
{
|
||||
std::cerr << "Cannot load symbol 'some_func': " << dlsym_error << '\n';
|
||||
dlclose(handle);
|
||||
return 1;
|
||||
}
|
||||
|
||||
some_func();
|
||||
|
||||
dlclose(handle);
|
||||
}
|
||||
Reference in New Issue
Block a user