Similar Threads:
1.C++ global constructors in xsub?
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).
2.Calling SUPER::constructor in the constructor
Is it possible to call the constructor that a function inherits from its
parent? I tried calling SUPER:: and SUPER-> in a constructor and got
errors. Am i correct in assuming that if I rewrite the constructor that
a copy of the parent object won't be available?
Thanks in advance,
Dan
3.Perl C, XS help
Hi,
I am trying port an Custom Perl module from one server to another. The
module uses C/XS and was built in 2001/2. I got the source and did
`perl Makefile.PL; make`. There was an error in one .c file:
...
store.c:592: error: 'my_perl' undeclared (first use in this function)
store.c:592: error: (Each undeclared identifier is reported only once
store.c:592: error: for each function it appears in.)
I solved that by adding
'static PerlInterpreter *my_perl;' near the top of the file.
After make distclean; perl Makefile, make and the same error with a
different file. This time however, once I added the static declaration
I got this error:
store.c:13: error: expected '=', ',', ';', 'asm' or '__attribute__'
before '*' token
It refers to the static declaration mentioned above.
I am a super newbie when it comes to C and I know this might be
straying OT but does anyone know how I can make this static declartion
in the correct way or perhaps point me to a list that might be able to
help?
Thanx,
Dp.
4.XS help
Hello All,
I'm trying to call C routine from Perl using XS but some how my 'make test'
is failing. Following are the steps I did :
file: hypotenuse.h
double hypotenuse(double x, double y); /* Func Declaration */
file: hypotenuse.c
/* Func Definition */
double hypotenuse(double x, double y)
{
return sqrt(x*x + y*y);
}
Steps :
1. h2xs -n Geometry -A -O -x -F '-I ../..' hypotenuse.h /created XS
components
2. cd Geometry // Went in the directory
3. cp ../hypotenuse.* . // Copied header and source files in Dir
4. Added Geometry.o and hypotenuse.o as objects in Makefile.pl
5. Perl Makefile.pl and make is ok
6. 'make test' is failing
Do someone have any idea where I'm going wrong? I did not read perl doc for
XS yet :(.
Error logs:
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/Geometry....NOK 1
# Failed test 'use Geometry;'
# in t/Geometry.t at line 9.
# Tried to use 'Geometry'.
# Error: Can't load
'/SES/rajni/claudio/rajni/myModule/Code/factorial/Geometry/blib/arch/auto/Ge
ometry/Geometry.so' for module Geometry:
/SES/rajni/claudio/rajni/myModule/Code/factorial/Geometry/blib/arch/auto/Geo
metry/Geometry.so: undefined symbol: hypotenuse at
/usr/lib/perl5/5.8.8/i586-linux-thread-multi/DynaLoader.pm line 230.
Thanks
Rajni
DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
5.Help w/Class::Date Date.xs
6. Help with xs: converting I32 to int ?
7. Problem using more than 1 module in Windows (XS) - please help
8. Copy constructor and Dup method in Perl