How to link festival TTS libraries in a C++ programme using g++

不问归期 提交于 2019-12-06 14:06:48

问题


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


回答1:


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



回答2:


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



来源:https://stackoverflow.com/questions/2846858/how-to-link-festival-tts-libraries-in-a-c-programme-using-g

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!