LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 07-17-2008, 03:19 AM   #1
WilliamTheBloody
LQ Newbie
 
Registered: May 2006
Location: Italy
Distribution: Gentoo
Posts: 12

Rep: Reputation: 0
Perl, XS and Festival


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...
Code:
void say(char *);
....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
 
Old 07-17-2008, 08:35 PM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 5.7, Solaris 10
Posts: 10,994

Rep: Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752
That's pretty deep Perl (not many get into XS). As a backup, it's worth asking the gurus at www.perlmonks.org while you're waiting here.
 
Old 07-21-2008, 09:31 AM   #3
WilliamTheBloody
LQ Newbie
 
Registered: May 2006
Location: Italy
Distribution: Gentoo
Posts: 12

Original Poster
Rep: Reputation: 0
thx for the advice
 
  


Reply

Tags
festival, perl


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Festival rvijay Linux - Software 5 09-28-2006 06:04 PM
Two Issues with Festival irfanhab Slackware 2 09-02-2006 12:48 AM
Festival ORiGiNAl-SiN Slackware 1 12-25-2005 02:20 AM
festival and c++ ximiansavior Programming 1 12-04-2003 01:26 AM
perl(Cwd) perl(File::Basename) perl(File::Copy) perl(strict)....What are those? Baldorg Linux - Software 1 11-09-2003 09:09 PM


All times are GMT -5. The time now is 10:39 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration