Aug 30, 2013, 11:07 AM
Post #1 of 1
Hi all ,
I want to link a C (.so) file with perl using XS
I am trying to call a C function within a .so file in perl .
I was able to generate the .xs , and also add code , I wrote a is_even(int) call in perl
No is_even() is in .xs file which on true calls a inline printf("Even") condition and false calls another main_print("Odd") . This main_print("Odd") is defined in a shared object (.so) file generated from a C file .
I am getting a
/usr/bin/perl: symbol lookup error: /home/abcd/perlPrac/test/blib/arch/auto/test/test.so: undefined symbol: main_print
Kindly need your suggestion as to make this work .. thanks in advance !