节C/C++API编制一个实例,联图书馆的错误
-
29-09-2019 - |
题
我有问题的节C++API(Windows XP)。
之后我做既节和speech_tools成功地(Cygwin),我有一个文件,称为festival_example.cc,其中包含:
#include <stdio.h>
#include <festival.h>
int main(int argc, char **argv)
{
EST_Wave wave;
int heap_size = 210000; // default scheme heap size
int load_init_files = 1; // we want the festival init files loaded
festival_initialize(load_init_files,heap_size);
// Say simple file
//festival_say_file("/etc/motd");
festival_eval_command("(voice_ked_diphone)");
// Say some text;
festival_say_text("hello world");
// Convert to a waveform
festival_text_to_wave("hello world",wave);
wave.save("/tmp/wave.wav","riff");
// festival_say_file puts the system in async mode so we better
// wait for the spooler to reach the last waveform before exiting
// This isn't necessary if only festival_say_text is being used (and
// your own wave playing stuff)
festival_wait_for_spooler();
return 0;
}
然后(Cygwin)I类型:
g++ festival_example.cc -I./festival/src/include -I./speech_tools/include -L./festival/src/lib -libFestival -L./speech_tools/lib -libestools -libestbase -libeststring
它找不到库。如果我写-I/cygdrive/c/0621/来源/建立/节/src/包括同在所有的错误仍然存在。
我有我的程序
C:\0621\source\build
和里面我的文件夹\节\并\speech_tools\
:)
解决方案
替换-lib*与-l*。
例如libFestival不会的工作。做
g++ festival_example.cc -I./festival/src/include -I./speech_tools/include -L./festival/src/lib -lFestival
不隶属于 StackOverflow