Re: C++ global constructors in xsub?
- From: Reinhard Pagitsch <rprp@xxxxxxx>
- Date: Wed, 11 May 2005 16:21:16 +0200
Hello John,
usenet.zaa.jabberwock@xxxxxxxxxxxx wrote:
Rather than bog this post down with my particular details, I'll just ask the basic question:
Is it possible to write a dynamically-loaded xsub for a library that has C++ global constructors?
I've googled this question to death and I haven't found a definite answer one way or the other, although one post led me to believe that building a new perl binary as described in CookbookB/CCsimple would solve the problem. It didn't, and I'm not sure how it could, but maybe I'm missing something.
If I get a "yes", I'll follow up with the gory details of my problem. But just so it's not completely open-ended, I'm running under HPUX 11.11, perl 5.8.6 (but I'd be willing to rebuild perl any way anyone suggests).
I am not on HPUX but I can do it. (OS = Windwos XP, MSVC/C++ compiler)
test.xs
e.g:
class Test
{
Test(void)
{
printf("Hello from class Test\n");
}
};Test testen;
But I putted it befor the MODULE/PACKAGE line.
Running the module I got printed "Hello from class Test"
regards, Reinhard .
- Follow-Ups:
- Re: C++ global constructors in xsub?
- From: usenet . zaa . jabberwock
- Re: C++ global constructors in xsub?
- References:
- C++ global constructors in xsub?
- From: usenet . zaa . jabberwock
- C++ global constructors in xsub?
- Prev by Date: C++ global constructors in xsub?
- Next by Date: Tie::Persistent issues
- Previous by thread: C++ global constructors in xsub?
- Next by thread: Re: C++ global constructors in xsub?
- Index(es):
Relevant Pages
|
|