gettext on Mac OS lion
用macport安装软件的时候,因为xcode4.2没有正确安装gettext,会导致出现如下错误xgettext: A --flag argument doesn't have the <keyword>:<argnum>:<flag> syntax: gettext:1:pass-c-format
因此考虑自己重新编译gettext-0.18.1.1,点此下载
编译gettext可能会遇到如下错误
stpncpy.c:34: error: expected declaration specifiers or ‘...’ before numeric constant
stpncpy.c:34: error: expected ‘)’ before ‘!=’ token
stpncpy.c:34: error: expected ‘)’ before ‘?’ token
make: *** Error 1
make: *** Waiting for unfinished jobs....
make: *** Error 2
make: *** Error 1
make: *** Error 2
make: *** Error 1
修改如下
Modify
__stnpcpy (char *dest, const char *src, size_t n)
to
__stpcpy (char *dest, const char *src, size_t n)
macport 安装的gettext默认位置在/opt/local/bin
gettext make install默认的位置在/usr/local/bin
因此,需要拷贝/usr/local/bin/xgettext覆盖/opt/local/bin下相应文件
页:
[1]