00001 /* 00002 dlopen version of CkDll class. 00003 This file can be #included whole by the configure script or ckdll.C. 00004 00005 Orion Sky Lawlor, olawlor@acm.org, 9/10/2002 00006 */ 00007 #include "ckdll.h" 00008 #include <unistd.h> //For unlink 00009 #include <dlfcn.h> //for dlopen, etc. 00010 00011 CkDll::CkDll(const char *name) { 00012 handle=dlopen(name,RTLD_NOW); 00013 } 00014 void *CkDll::lookup(const char *name) { 00015 return dlsym(handle,name); 00016 } 00017 CkDll::~CkDll() { 00018 dlclose(handle); 00019 } 00020 00021 const char *CkDll::extension=".so";