Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #11249
| From | Edek <edek.pienkowski@gmail.com> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: Anything new on run-time libraries loading? |
| Date | 2011-11-03 20:07 +0100 |
| Organization | ATMAN - ATM S.A. |
| Message-ID | <j8uonr$hp3$1@node2.news.atman.pl> (permalink) |
| References | (2 earlier) <j8o01q$oqm$1@news.xmission.com> <4eb04899$0$14736$5fc3050@news.tiscali.nl> <slrnjb1ni3.1bk.grahn+nntp@frailea.sa.invalid> <j8r0u3$mqa$2@node2.news.atman.pl> <slrnjb5n73.1bk.grahn+nntp@frailea.sa.invalid> |
On 11/03/2011 07:26 PM, Jorgen Grahn wrote: > On Wed, 2011-11-02, Edek wrote: >> On 11/02/2011 07:08 AM, Jorgen Grahn wrote: >>> On Tue, 2011-11-01, Dombo wrote: >>>> Op 01-Nov-11 6:28, Richard schreef: >>>>> [Please do not mail me a copy of your followup] >>>>> >>>>> Goran<goran.pusic@gmail.com> spake the secret code >>>>> <46010469-4b5a-4c7c-bc88-f202f3df0841@q13g2000vbd.googlegroups.com> thusly: >>>>> >>>>>> [...] There's COM on Windows and that's about it. >>>>> >>>>> I believe the unix equivalent is CORBA. >>>> >>>> More like the cross-platform equivalent; CORBA implantations are >>>> available for other platforms as well (including Windows). There also >>>> many other middleware solutions. >>> >>> Although at that point, you might find yourself saying "maybe a plain >>> C interface to the loadable part isn't such a bad idea after all" ... >> >> Either I am missing something huge, or what are you talking about? > > I'm saying that if your problem is the one in the original posting > (calling code in dlopen()ed libraries) you'd probably rather stick to > a C interface than go CORBA, or XMLsomething, or ... I misaddressed my post, I think Goran started talking about COM as if dlopen limited anybody to C: > He who needs something more than that, C, should reach for > some integration tech that defines needed binary-level compatibility. > I find it amazing that virtually no such tech, that is cross-platform > and in wide use, exist today. There's COM on Windows and that's about > it. So maybe LoadLibrary on Windows limits usage to C and one needs COM, I don't know if that is true or not. Yeah, platforms do differ. > > (Perhaps the topic shifted without me noticing it, because I can't see > how CORBA solves that at all.) CORBA has a lot of features like load balancing, entities and so on; using CORBA for a plugin framework is 'a bit of' an overkill. I see no point in using CORBA on a single machine at all, I see the major downside of using anything that is so heavy for simple method calls, mainly because of PITA for developers. > >> You can have a C++ interface (see the FAQ in OP, the triangle class >> example) > > I missed that part -- but at a quick glance it doesn't seem much more > useful than a C interface. If the library is C, I would use C. If it is C++, I would use C++, not C. I find it useful to use C++ library by C++ API as opposite to using a C++ lib by C API. BTW, plugins do know internals of the main program with libraries and can freely use them. One can just use C++, observing the same principles: ODR (put each plugin in its own namespace) and other code correctness. Technically build adjustments need to be made, see gcc faq on DSO. In short for RTTI type information is by default pulled in on ELF during linking, and loader does not see it, because linker does not export it. So to get exceptions, templates and other such beasts working, one needs to export all symbols (-E) and then the loader can do its job during dlopen(). Edek
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Anything new on run-time libraries loading? "Waldek M." <wm@localhost.localdomain> - 2011-10-31 18:54 +0100
Re: Anything new on run-time libraries loading? Goran <goran.pusic@gmail.com> - 2011-10-31 12:34 -0700
Re: Anything new on run-time libraries loading? legalize+jeeves@mail.xmission.com (Richard) - 2011-11-01 05:28 +0000
Re: Anything new on run-time libraries loading? Ian Collins <ian-news@hotmail.com> - 2011-11-01 19:49 +1300
Re: Anything new on run-time libraries loading? Dombo <dombo@disposable.invalid> - 2011-11-01 20:30 +0100
Re: Anything new on run-time libraries loading? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-11-02 06:08 +0000
Re: Anything new on run-time libraries loading? Edek <edek.pienkowski@gmail.com> - 2011-11-02 10:03 +0100
Re: Anything new on run-time libraries loading? Dombo <dombo@disposable.invalid> - 2011-11-02 19:38 +0100
Re: Anything new on run-time libraries loading? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-11-03 18:26 +0000
Re: Anything new on run-time libraries loading? Edek <edek.pienkowski@gmail.com> - 2011-11-03 20:07 +0100
Re: Anything new on run-time libraries loading? "Waldek M." <wm@localhost.localdomain> - 2011-11-01 08:28 +0100
Re: Anything new on run-time libraries loading? Edek <edek.pienkowski@gmail.com> - 2011-11-01 11:28 +0100
Re: Anything new on run-time libraries loading? Paavo Helde <myfirstname@osa.pri.ee> - 2011-11-01 16:34 -0500
Re: Anything new on run-time libraries loading? Edek <edek.pienkowski@gmail.com> - 2011-11-02 10:01 +0100
Re: Anything new on run-time libraries loading? Paavo Helde <myfirstname@osa.pri.ee> - 2011-11-02 17:03 -0500
Re: Anything new on run-time libraries loading? Edek <edek.pienkowski@gmail.com> - 2011-11-03 20:40 +0100
Re: Anything new on run-time libraries loading? "Waldek M." <wm@localhost.localdomain> - 2011-11-03 21:06 +0100
csiph-web