Re: C++ global constructors in xsub?



Thanks for your reply. However, I'm not sure if your example requires
global constructors (I'm not well experienced with C++, so I'm not
exactly sure what constructs require this; static members maybe?).
What I'm referring to by "global constructors" is code that gets run by
__do_global_ctors() when the program starts up.

The library I'm writing the xsub for is a 3rd party library, so I don't
have access to the souce or anything. However, I'm pretty sure this is
the problem. It works fine with LINKTYPE=static, and in the debugger I
can actually see it call the library from __do_global_ctors(). With a
dynamic build, it first calls the library when I call one of the xsub
functions, and dies with a bus error or memory error.

--
JAB

.



Relevant Pages

  • Re: C++ global constructors in xsub?
    ... global constructors (I'm not well experienced with C++, so I'm not exactly sure what constructs require this; static members maybe?). ... The library I'm writing the xsub for is a 3rd party library, ... and dies with a bus error or memory error. ...
    (comp.lang.perl.modules)
  • Help - Perl, XS and global constructors
    ... I have a third-party dynamic library that I'm trying to write an xsub ... and it apparently has global constructors ... But how would perl know what constructors need to ...
    (comp.sys.hp.hpux)
  • Re: C++ global constructors in xsub?
    ... global constructors (I'm not well experienced with C++, so I'm not exactly sure what constructs require this; static members maybe?). ... What I'm referring to by "global constructors" is code that gets run by __do_global_ctorswhen the program starts up. ... With a dynamic build, it first calls the library when I call one of the xsub functions, and dies with a bus error or memory error. ...
    (comp.lang.perl.modules)