rtengine/src/runtime/dynamic_libs.h
2024-01-16 16:10:56 +01:00

27 lines
801 B
C

#ifndef RT_DYNAMIC_LIBS_H
#define RT_DYNAMIC_LIBS_H
#include "runtime.h"
#ifdef _WIN32
#define RT_DLLNAME(s) \
(".\\"s \
".dll")
#elif defined(__linux__)
#define RT_DLLNAME(s) \
("./lib"s \
".so")
#endif
typedef void *rt_dynlib;
RT_DLLEXPORT rt_dynlib rtOpenLib(const char *libname);
RT_DLLEXPORT rt_dynlib rtOpenCallerLib(void);
RT_DLLEXPORT void *rtGetSymbol(rt_dynlib lib, const char *symbol);
RT_DLLEXPORT void rtCloseLib(rt_dynlib lib);
#endif