Hi i have been trying to make a c++ program of mine to work on Linux GCC I have used a Text to speech lib called Festival 2.1
<code>
#include<iostream>
#include<stdlib.h>
#include<festival/festival.h>
using namespace std;
int main()
{
int heap_size=210000;
int load_init_files=1;
festival_initialize(load_init_files,heap_size);
festival_say_text("Hi dude, how are you ?");
festival_wait_for_spooler();
return 0;
}
</code>
This is my program. g++ test.cpp -l Festival -I/usr/include/festival -I/usr/lib/speech_tools/include -leststring -lestools -lestbase Using this i am able to compile successfully and exec could be created.
But, how do i set env variables etc in Eclipse CDT(ubuntu 11.10) to work using this code .. Now i am getting the error
/home/gp/WORKSPACE-CDT/LBOT/Debug/../src/test.cpp:21: undefined reference to festival_initialize(int, int)'
/home/gp/WORKSPACE-CDT/LBOT/Debug/../src/test.cpp:22: undefined reference to
EST_String::EST_String(char const*)'
/home/gp/WORKSPACE-CDT/LBOT/Debug/../src/test.cpp:22: undefined reference to festival_say_text(EST_String const&)'
/home/gp/WORKSPACE-CDT/LBOT/Debug/../src/test.cpp:23: undefined reference to
festival_wait_for_spooler()'
./src/test.o: In function EST_Chunk::operator--()':
/usr/include/speech_tools/EST_Chunk.h:140: undefined reference to
EST_Chunk::~EST_Chunk()'
/usr/include/speech_tools/EST_Chunk.h:140: undefined reference to `EST_Chunk::operator delete(void*)'
collect2: ld returned 1 exit status
make: * [LBOT] Error 1