0

我发现编译的方向

我已经尝试使用 Visual Studio 2013 使用 Visual Studio 2013 编译来自Festvox 最新(自 2010 年以来没有更新)的说明来编译语音工具

nmake /nologo /FVCMakefile > output.txt

slib_doc.cc
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(423) : error C2988: unrecognizable template declaration/definition
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(423) : error C2059: syntax error : 'constant'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(429) : error C2143: syntax error : missing ';' before '{'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(429) : error C2447: '{' : missing function header (old-style formal list?)
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\cmath(96) : error C2039: 'isnan' : is not a member of '`global namespace''
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\cmath(96) : error C2873: 'isnan' : symbol cannot be used in a using-declaration
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\cmath(96) : error C2039: 'isnormal' : is not a member of '`global namespace''
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\cmath(96) : error C2873: 'isnormal' : symbol cannot be used in a using-declaration

尝试编译Festival

nmake /nologo /FVCMakefile > output.txt
festival.cc
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(423) : error C2988: unrecognizable template declaration/definition
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(423) : error C2059: syntax error : 'constant'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(429) : error C2143: syntax error : missing ';' before '{'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(429) : error C2447: '{' : missing function header (old-style formal list?)
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\cmath(96) : error C2039: 'isnan' : is not a member of '`global namespace''
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\cmath(96) : error C2873: 'isnan' : symbol cannot be used in a using-declaration
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\cmath(96) : error C2039: 'isnormal' : is not a member of '`global namespace''
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\cmath(96) : error C2873: 'isnormal' : symbol cannot be used in a using-declaration

我还尝试编译我在 Github 上找到的这个版本的语音工具。
带有语音工具的 Github repo 我遇到了很多错误,例如

speech-tools\include\EST_String.h(156) : error C2061: syntax error : identifier 'ssize_t'

我认为这应该在 Speech-tools\include\EST_system.h 中处理

#   if defined(_MSC_VER)
#       include <BaseTsd.h>
        typedef SSIZE_T ssize_t;
#   endif

我能够通过将它们替换为 size_t 来绕过 ssize_t 问题,这可能会在以后成为问题。

最终出现与上述类似的错误。

nmake /nologo /FVCMakefile > output.txt
slib_format.cc

C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(423) : error C2988:     unrecognizable template declaration/definition
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(423) : error C2059: syntax error : 'constant'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(429) : error C2143: syntax error : missing ';' before '{'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(429) : error C2447: '{' : missing function header (old-style formal list?)
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\cmath(96) : error C2039: 'isnan' : is not a member of '`global namespace''
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\cmath(96) : error C2873: 'isnan' : symbol cannot be used in a using-declaration
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\cmath(96) : error C2039: 'isnormal' : is not a member of '`global namespace''
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\cmath(96) : error C2873: 'isnormal' : symbol cannot be used in a using-declaration

(在写这一切时,我意识到所有编译它的尝试似乎都遇到了 math.h 和 cmath.h 的类似问题,但似乎来自不同的地方)

4

2 回答 2

2

您可以下载 Festival 的新版本 (2.4):http ://www.cstr.ed.ac.uk/projects/festival/download.html 。

此外,要使用 VS 2013 构建它,请尝试在Speech_tools的 EST_defines_win32.h 中更改此行

#define isnan(N) 0

#if (_MSC_VER < 1800 ) // older than VS 2013
#define isnan(N) 0 
#endif
于 2015-03-06T16:48:59.677 回答
0

您没有遵循说明中显示的步骤,这就是它不适合您的原因。

说明清楚地说明使用 cygwin 获取 GNU make 的副本,或使用 VS2005。它确实说 2006 年(以及之后的那些)不起作用....

为什么不直接按照 cygwin 路径编译呢?

于 2014-12-26T11:09:39.350 回答