如何解决在构建 gettext 0.20 时出现错误:重新定义“vasprintf”
我尝试在 Windows 10 上使用 mingw 工具链编译 gettext 0.20,它给出如下错误。
In file included from lib-asprintf.c:46:
vasprintf.c:38:1: error: redefinition of ‘vasprintf’
38 | vasprintf (char **resultp,const char *format,va_list args)
| ^~~~~~~~~
In file included from vasnprintf.c:70,from lib-asprintf.c:31:
/usr/x86_64-w64-mingw32/sys-root/mingw/include/stdio.h:262:5: note: previous definition of ‘vasprintf’ was here
262 | int vasprintf(char **__ret,const char *__format,__builtin_va_list __local_argv)
| ^~~~~~~~~
In file included from lib-asprintf.c:47:
asprintf.c:29:1: error: redefinition of ‘asprintf’
29 | asprintf (char **resultp,...)
| ^~~~~~~~
In file included from vasnprintf.c:70,from lib-asprintf.c:31:
/usr/x86_64-w64-mingw32/sys-root/mingw/include/stdio.h:251:5: note: previous definition of ‘asprintf’ was here
我使用了以下配置命令。
./configure --host=x86_64-w64-mingw32 --prefix="/cygdrive/c/gettext_build" \
CC=x86_64-w64-mingw32-gcc \
CXX=x86_64-w64-mingw32-g++ \
CPPFLAGS="-I/cygdrive/c/gettext_build/include -Wall" \
LDFLAGS="-L/cygdrive/c/gettext_build/lib" --with-libiconv-prefix="/cygdrive/c/Apps/iconv-1.9.2.win32"
我也尝试过如下修复,但没有帮助。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。