我正在使用Festival c ++ Api,但在
提供的手册中http://www.cstr.ed.ac.uk/projects/festival/manual/festival_28.html#SEC132
说连接festival / src / lib / libFestival.a等。 所以请告诉我如何将它们与我的c ++程序联系起来
答案 0 :(得分:1)
从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
答案 1 :(得分:0)
我假设您将file.cpp放在包含从包中提取的festival和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 - leststring