Adrian Chadd wrote:
> Ok, how's that work for exposing C++ interfaces in Squid to external
> modules? Things could get quite ugly if you're going C++ -> C -> C++..
Perhaps I was unclear. There's no C++ -> C -> C++; the only C step is
module_init(), which is called when the module is loaded and registers a
bunch of C++ functional objects in their containers (e.g., in Squid,
probably an execution stack). The rest is C++. Only, if you seek
portability, and thus do not rely on -rdynamic working fine with g++
only on Linux (and most Unices), you need to move everything your
modules may need to use, include the functional objects storage (the map
in my example) into a (dynamic) library the modules can be linked
against. Note that, AFAIR, I could make those modules work also on
Cygwin; don't remember if either by -rdynamic or it's not needed at all.
I know it is on Linux.
Cheers, p.
Ing. Pierangelo Masarati
OpenLDAP Core Team
SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
---------------------------------------
Office: +39 02 23998309
Mobile: +39 333 4963172
Email: pierangelo.masarati@sys-net.it
---------------------------------------
Received on Fri Sep 07 2007 - 00:09:42 MDT
This archive was generated by hypermail pre-2.1.9 : Mon Oct 01 2007 - 12:00:05 MDT