Aspell won't build on OS X 10.9 (Mavericks)

浪子不回头ぞ 提交于 2019-12-12 14:53:31

问题


It fails thus:

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

I've seen this error mentioned several times, but I've not seen any fixes.

I suppose I could install Fink or MacPorts, but my experience with both of those has been mixed (and frustrating), and it seems like overkill for just one program. Is there a way to get aspell to build, or is Fink or MacPorts the only practical option? Which will cause fewer problems, Fink or MacPorts?


回答1:


The definition of those externs is not for C++ - surround the entire block with these preprocessor tags in interfaces/cc/aspell.h:

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



回答2:


The answer by @lotsoffreetime works but needs some clarification.

Basically, you have to edit the interfaces/cc/aspell.h file by adding

#ifndef __cplusplus

before the list of "extern" errors, which starts with:

extern const struct AspellErrorInfo * const aerror_other;

and add

#endif

at the end of the list, after it reads

extern const struct AspellErrorInfo * const aerror_invalid_expression;



来源:https://stackoverflow.com/questions/25395685/aspell-wont-build-on-os-x-10-9-mavericks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!