Top |
void * | gretl_dlopen () |
void * | gretl_dlsym () |
void * | get_plugin_function () |
void | close_plugin () |
void | plugins_cleanup () |
Some of the functionality of libgretl is provided by plugin modules that are loaded on demand. Here we have functions for opening and closing plugins, and for obtaining a pointer to a symbol from a gretl plugin. These functions should work on both unix-type systems (including Mac OS X) and MS Windows.
Note that if you wish to make use of gretl plugins in your own
program, you will have to build and install the plugins (of
course) and you may also have to tell libgretl where to
find them. This can be done via the libgretl function
set_gretl_plugin_path()
. For example, if the plugins are
in /opt/gretl/lib/gretl-gtk2 then in a C program you could do:
set_gretl_plugin_path("/opt/gretl/lib/gretl-gtk2");
void * gretl_dlopen (const char *path
,int now
);
Cross-platform wrapper for opening a shared code object on MS Windows or unix-type systems (including OS X).
void * gretl_dlsym (void *handle
,const char *name
);
Cross-platform wrapper for obtaining a pointer to
a named symbol in a shared object represented by
handle
.
void *
get_plugin_function (const char *funcname
);
Looks up funcname
in gretl's internal plugin table and
attempts to open the plugin object file that offers the
given function.