Problem compiling gnutls

Vincent Torri vincent.torri at gmail.com
Sat Aug 11 07:42:22 CEST 2012


On Fri, Aug 10, 2012 at 5:53 PM, nyjkkyjn at gmail.com <nyjkkyjn at gmail.com> wrote:
> I'm trying to compile gnutls 3.0.22 through mingw-w64 toolchain on
> cygwin.. The configuration step seems to be OK, but when I execute
> "make" while processing ex-cxx.cpp in doc/examples I get this error:
>         /usr/x86_64-w64-mingw32/sys-root/mingw/include/stdio.h:328:5:
> error: previous declaration of 'int
> asprintf(char**, const char*, ...)' with 'C++' linkage
>         ../../gl/stdio.h:1425:1: error: conflicts with new declaration
> with 'C' linkage
>         /usr/x86_64-w64-mingw32/sys-root/mingw/include/stdio.h:339:5:
> error: previous declaration of 'int
> vasprintf(char**, const char*, char*)' with 'C++' linkage
>         ../../gl/stdio.h:1446:1: error: conflicts with new declaration
> with 'C' linkage
> Is it a problem with the toolchain or else? Is there a workaround?
> Thanks, anyway.. I hope someone could help me..

the correct fix is to check if these functions  are available in
configure.ac and declare/define them conditionally in the cpp file

Vincent Torri




More information about the Gnutls-devel mailing list