#pragma once #include struct lib { const char *src_fname; const char *lib_fname; const char *sym_name; void *handle; void *sym; }; struct ccdl { struct lib libs[2], *lib; pthread_t watcher_thread; }; void lib_init(struct lib *, const char *src_fname, const char *sym_name); int lib_build(struct lib *); void *lib_get(struct lib *); void lib_deinit(struct lib *); void ccdl_init(struct ccdl *, const char *src_fname, const char *sym_name); void *ccdl_get(struct ccdl *); int ccdl_watch(struct ccdl *); int ccdl_rebuild(struct ccdl *); int ccdl_deinit(struct ccdl *);