From: Phoenix87 on 7 Feb 2010 19:12 Hallo everybody I want to build some shared libraries from C++ code defining classes because I want to load them dynamically in programs that need that classes. I've read about dlopen and co., which require the implementation of factory procedures in order to dynamically allocate class instances from the loaded shared object. Is there an alternative way to dynamically load classes in C++ programs? I mean something which allows to instantiate new class instances with new keyword etc...Basically my question is quite the same thing as asking how the STL, or the CERN ROOT libraries work. Thanks in advice! Gab.
From: Edgardo Portal on 8 Feb 2010 09:38 On 2010-02-08, Phoenix87 <phoenix1987(a)gmail.com> wrote: > Hallo everybody > > I want to build some shared libraries from C++ code defining classes > because I want to load them dynamically in programs that need that > classes. I've read about dlopen and co., which require the > implementation of factory procedures in order to dynamically allocate > class instances from the loaded shared object. Is there an alternative > way to dynamically load classes in C++ programs? I mean something > which allows to instantiate new class instances with new keyword > etc...Basically my question is quite the same thing as asking how the > STL, or the CERN ROOT libraries work. I've used the Factory pattern with static factory class methods, along the lines of: http://www.faqs.org/docs/Linux-mini/C++-dlopen.html#loadingfunctions
|
Pages: 1 Prev: ANN: Seed7 Release 2010-02-07 Next: QNX 4.25, raw sockets |