next up previous contents index
Next: CxxCompilerLinker class Up: Module SysTools Previous: Using DataCards   Contents   Index


Dynamic linker

The class PDynLinkMgr can be used for managing shared libraries at run time. The example below shows the run time linking of a function:
extern "C" void myfunc();

#include "pdlmgr.h"
// ...
string soname = "mylib.so";
string funcname = "myfunc";
PDynLinkMgr dyl(soname);
DlFunction f = dyl.GetFunction(funcname); 
if (f != NULL) { 
// Calling the function 
  f();    
}



Reza Ansari
2001-03-07