I am trying to write some C++
code (using the C++ API) for Festival
and am getting stuck while trying to compile. Here is how I invoke g++
:
g++ -Wall -pedantic -I../ -I../speech_tools/include/ helloFestival.C -o h -L../festival/src/lib/libFestival.a -L../speech_tools/lib/libestools.a -L../speech_tools/lib/libestbase.a -L../speech_tools/lib/libeststrings.a |& tee festival.runLog
The error I get is:
In file included from ../speech_tools/include/EST.h:48,
from ../festival/src/include/festival.h:47,
from helloFestival.C:4:
../speech_tools/include/EST_String.h:50: error: declaration of ‘void abort()’ throws different exceptions
/usr/include/stdlib.h:513: error: from previous declaration ‘void abort() throw ()’
The offending line in EST_String.h would be:
extern "C" void abort(void);
The main()
function I have used can be found here: festvox.org/docs/manual-1.4.3/festival_28.html#SEC133
The compilation and linking instructions given here are the ones I have used.
I have looked this problem on the net and some of the solutions suggest that it maybe because of backward compatibility, or calling an abort() from within a destructor etc. My questions are:
- How do I get rid of this?
- Why do I see this error?