dlsym
This commit is contained in:
parent
92bc02b3a5
commit
9798f880f9
5 changed files with 25 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
#include <stdio.h>
|
||||
|
||||
void test(){
|
||||
printf("testing 123\n");
|
||||
printf("testing 123(unix)\n");
|
||||
}
|
|
@ -1,6 +1,12 @@
|
|||
#include "../../src/dlopen.h"
|
||||
|
||||
typedef void (*func_handle)();
|
||||
|
||||
int main()
|
||||
{
|
||||
struct hotwire_dll_t dll = hw_dlopen("./bin/exampleUnixLib.dll", RTLD_NOW);
|
||||
|
||||
func_handle func = (func_handle)hw_dlsym(dll, "test");
|
||||
|
||||
func();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue