Aspell 无法在 OS X 10.9(Mavericks)上构建。

3
它因此失败:
./common/errors.hpp:17:36: error: redefinition of 'aerror_other' with a different type: 'const acommon::ErrorInfo *const' vs 'const struct AspellErrorInfo *const'

我看到过这个错误被提到过几次,但是我没有看到任何解决方法。

我想我可以安装Fink或MacPorts,但我对它们的经验并不好(而且令人沮丧),而且似乎为了一个程序而使用这些工具有点大材小用。是否有一种方法可以构建aspell,或者Fink或MacPorts是唯一实用的选项?哪一个会引起更少的问题,Fink还是MacPorts?

2个回答

5

这些extern变量的定义不适用于C++ - 在interfaces/cc/aspell.h中,将整个代码块用以下预处理器标记包围起来:

#ifndef __cplusplus
extern const struct AspellErrorInfo * const aerror_other;
...snip...
extern const struct AspellErrorInfo * const aerror_invalid_expression;
#endif

1
"@lotsoffreetime的回答有效,但需要进一步澄清。基本上,您需要通过添加内容编辑interfaces/cc/aspell.h文件。"
#ifndef __cplusplus

在“extern”错误列表之前,该列表以以下内容开头:

extern const struct AspellErrorInfo * const aerror_other;

并添加:
#endif

在列表末尾,在读取以下内容后:

extern const struct AspellErrorInfo * const aerror_invalid_expression;


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接