mirror of
https://github.com/pikami/cosmium.git
synced 2025-12-20 01:10:44 +00:00
Added cross-platform shared library tests
This commit is contained in:
@@ -3,13 +3,24 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <dlfcn.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
extern void *handle;
|
||||
#ifdef _WIN32
|
||||
#include <unistd.h>
|
||||
#include <windows.h>
|
||||
typedef HMODULE lib_handle_t;
|
||||
#else
|
||||
#include <dlfcn.h>
|
||||
typedef void* lib_handle_t;
|
||||
#endif
|
||||
|
||||
extern lib_handle_t handle;
|
||||
|
||||
void *load_function(const char *func_name);
|
||||
char *compact_json(const char *json);
|
||||
char *get_load_error(void);
|
||||
lib_handle_t load_library(const char *path);
|
||||
void close_library(lib_handle_t handle);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user