How to link festival TTS libraries in a C++ progra

2019-04-15 11:47发布

i am using Festival c++ Api but in the manual provided at

http://www.cstr.ed.ac.uk/projects/festival/manual/festival_28.html#SEC132

saying to link festival/src/lib/libFestival.a etc. so please tell me hw to link them with my c++ programme

2条回答
时光不老,我们不散
2楼-- · 2019-04-15 12:44

The simplest way to link a static library from g++ is simply to name the library on the command line, using the complete path:

g++ mycode.cpp -o myprog /myinstall/festival/src/lib/libFestival.a

where /myinstall is wherever you installed the libraries. You can also specify the path and the library with the -L and -l flags:

g++ mycode.cpp -o myprog -L/myinstall/festival/src/lib -lFestival
查看更多
聊天终结者
3楼-- · 2019-04-15 12:46

I assume that you put your file.cpp in the directory containing festival and speech_tools which are extracted from packages.

compile:

g++ yourFile.cpp -o yourFile -I./festival/src/include -I./speech_tools/include -L./festival/src/lib -lFestival -L./speech_tools/lib/ -lestools -lestbase -leststring

查看更多
登录 后发表回答