【发布时间】:2015-11-12 04:29:21
【问题描述】:
我正在使用 Festival c++ Api,但在
提供的手册中http://www.cstr.ed.ac.uk/projects/festival/manual/festival_28.html#SEC132
说要链接festival/src/lib/libFestival.a 等。 所以请告诉我如何将它们与我的 c++ 程序链接起来
【问题讨论】:
标签: c++ g++ text-to-speech festival
我正在使用 Festival c++ Api,但在
提供的手册中http://www.cstr.ed.ac.uk/projects/festival/manual/festival_28.html#SEC132
说要链接festival/src/lib/libFestival.a 等。 所以请告诉我如何将它们与我的 c++ 程序链接起来
【问题讨论】:
标签: c++ g++ text-to-speech festival
从 g++ 链接静态库的最简单方法是在命令行上使用完整路径命名库:
g++ mycode.cpp -o myprog /myinstall/festival/src/lib/libFestival.a
/myinstall 是您安装库的位置。您还可以使用 -L 和 -l 标志指定路径和库:
g++ mycode.cpp -o myprog -L/myinstall/festival/src/lib -lFestival
【讨论】:
我假设您将 file.cpp 放在包含从包中提取的节日和 Speech_tools 的目录中。
编译:
g++ yourFile.cpp -o yourFile -I./festival/src/include -I./speech_tools/include -L./festival/src/lib -lFestival -L./speech_tools/lib/ -lestools -lestbase -字符串
【讨论】: