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.