CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
I want to link a C (.so) file with perl using XS


New User

Aug 30, 2013, 11:07 AM

Post #1 of 1 (1449 views)
I want to link a C (.so) file with perl using XS Can't Post

Hi all ,

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

use ExtUtils::testlib;
use test;

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/ undefined symbol: main_print

Kindly need your suggestion as to make this work .. thanks in advance !


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives