package Hello; use Inline C => <<'END_C'; void say_hello() { printf("Greetings, earthlings!\n"); } END_C 1; #### use strict; use warnings; use Hello; use Inline C => <<'END_C'; extern void say_hello(); void say_goodbye() { say_hello(); printf("Prepare to die!\n"); } END_C say_goodbye(); #### /Users/marvin/perltest/ $ perl hello_goodbye.pl Greetings, earthlings! Prepare to die! /Users/marvin/perltest/ $ #### marvin@linlin:~/perltest$ /usr/local/debugperl/bin/perl5.10.0 hello_goodbye.pl /usr/local/debugperl/bin/perl5.10.0: symbol lookup error: /home/marvin/perltest/_Inline/lib/auto/hello_goodbye_pl_f0b6/hello_goodbye_pl_f0b6.so: undefined symbol: say_hello marvin@linlin:~/perltest$ #### $ perl hello_goodbye.pl /libexec/ld-elf.so.1: /usr/home/creamyg/perltest/_Inline/lib/auto/hello_goodbye_pl_f0b6/hello_goodbye_pl_f0b6.so: Undefined symbol "say_hello" $ #### Index: lib/Lingua/Stem/Snowball.pm =================================================================== --- lib/Lingua/Stem/Snowball.pm (revision 97) +++ lib/Lingua/Stem/Snowball.pm (working copy) @@ -15,13 +15,17 @@ $VERSION = '0.95'; -@ISA = qw( Exporter ); +@ISA = qw( Exporter DynaLoader ); %EXPORT_TAGS = ( 'all' => [qw( stemmers stem )] ); @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); -require XSLoader; -XSLoader::load( 'Lingua::Stem::Snowball', $VERSION ); +require DynaLoader; +__PACKAGE__->bootstrap($VERSION); +# Ensure that C symbols are exported so that other shared libaries (e.g. +# KinoSearch) can use them. See Dynaloader docs. +sub dl_load_flags { 0x01 } + # a shared home for the actual struct sb_stemmer C modules. $stemmifier = Lingua::Stem::Snowball::Stemmifier->new;