I think C++ Perl binding is an exciting issue, like C++, STL and Perl
are. C++ is evolving fast, as does Perl. So, in my opinion, it would be
great if we have a clear, well documented way to deploy a few C++
library's functions into Perl modules. My XS knowledge is poor, but I
know some C++, and am willing to help somehow.

The clearest point we have is: h2xs is _not_ suitable for autogenerating
C++ Perl bindings.

Assuming that, and after reading the direct and excelent John Keiser's
http://www.johnkeiser.com/perl-xs-c++.html tutorial, it seems like:
avoid h2xs and C++ parsing and every thing's gonna be all right.

Things are walking here. Now I worry about this:

Nick Ing-Simmons wrote:
> It it really fails at "make test" stage then you probably need
> LD=g++ or similar to link in the iostream etc.
> Note that not all C++ implementations are dynamic loading friendly.
> e.g. if you load a C++ extension and root executable isn't C++
> (and perl isn't) then static constuctors for 'cout' may not have
> been called.

In CookBookB/CCsimple (CPAN/authors/id/DMR/), mentioned in Keiser's
tutorial, there's a note about a way to properly "add" C++ loading
capability into the C perl binary. (I confess I didn't fully understand
that, though, too much confusion about static/dynamic C/C++ linkage.)

Silvio

Reply via email to