i found the solution to this. So if anyone gets the same problem running Festival tts, it can help :) basically the environment flags and variables can be set in eclipse through project properties and changing the toolchain settings STEPS: UBUNTU 11.10
GCC 4.x pre-installed
Elipse CDT was installed using terminal command
pthreads configured in eclipse using: project->preferences->c/c++ build/settings->GCC linker-> library vars add "pthreads"
Festival installed using: sudo apt-get install festival
Festival dev installed using: sudo apt-get install festival-dev festvox-don build-essential g++
Unresolved inclusion error: goto eclipse, project->preferences->c/c++ build/settings and add festival,speech_tools path to c,c++,linker directories
#include<stdio.h>
#include<festival.h>
int main(int argc,char **argv)
{
int heap_size=210000;
int load_init_files=1;
festival_initialize(load_init_files,heap_size);
festival_say_text("it is lunch time");
festival_wait_for_spooler();
return 0;
}
TERMINAL
sudo g++ main.cpp -l Festival -I/usr/include/festival -I/usr/lib/speech_tools/include -l eststring -l estools -l estbase -o nat.out
ECLIPSE
project->preferences->c/c++ build/settings->GCC linker-> library vars add 'Festival'
project->preferences->c/c++ build/settings->GCC linker-> library vars add 'eststring'
project->preferences->c/c++ build/settings->GCC linker-> library vars add 'estools'
project->preferences->c/c++ build/settings->GCC linker-> library vars add 'estbase'