Hi, i'm trying to use the Festival api in a perl module obviously using xs. it compile fine, but when i launch the perl script it hangs with
perl: symbol lookup error: /home/....../AnotherTest/blib/arch/auto/AnotherTest/AnotherTest.so: undefined symbol: _ZNSt3TTSC1Ev
i've write a simple c++ class to use the festival api, a test code like that work fine:
Code:
#include "TTS.h"
int main(int argc, char **argv)
{
std::TTS *e=new std::TTS();
if (argc==2) {
e->say(argv[1]);
}
return 0;
}
I append the XS file ....
Code:
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include "ppport.h"
#include "TTS.h"
MODULE = AnotherTest PACKAGE = AnotherTest
void
speak(txt)
char *txt;
CODE:
std::TTS *e=new std::TTS();
e->say(txt);
...the method signature...
....ant the makefile.PL
Code:
use 5.008008;
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
$CC='g++';
WriteMakefile(
NAME => 'AnotherTest',
VERSION_FROM => 'lib/AnotherTest.pm', # finds $VERSION
PREREQ_PM => {}, # e.g., Module::Name => 1.1
($] >= 5.005 ? ## Add these new keywords supported since 5.005
(ABSTRACT_FROM => 'lib/AnotherTest.pm', # retrieve abstract from module
AUTHOR => 'A. U. Thor <spike@(none)>') : ()),
LIBS => ['-lFestival','-lesttools','-lestbase','-leststring','-lncurses'], # e.g., '-lm'
DEFINE => '', # e.g., '-DHAVE_SOMETHING'
INC => '-I. -I/usr/include/speech-tools/ -L/usr/lib/', # e.g., '-I. -I/usr/include/other'
'CC' => $CC,
'LD' => '$(CC)',
);
i've read this a lot of time without find the problem, maybe someone else know where i'm doing wrong
