On Mon, Mar 23, 2015 at 5:52 PM, Vladimir Levijev <[email protected]> wrote: > Hi, > I can't figure out why gnutls_malloc() is never resolved on Windows > (2008, 32-bit) here. I'm using this code sample: > #include <gnutls/gnutls.h> > int main() > { > void *p = gnutls_malloc(10); > return 0; > } > It compiles perfectly on GNU/Linux (gcc /tmp/hellognutls.c -o > /tmp/hellognutls -Wall -lgnutls, I'm using version 2.12.20 though) but > on Windows (I'm using latest pre-compiled library from gnu.org, > 3.3.13) I get linking error: >>cl hellognutls.c -I \gnutls\include /c /Fo"hellognutls.o" > Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for > 80x86 > Copyright (C) Microsoft Corporation. All rights reserved. > hellognutls.c
I have no such issue when using mingw to compile with the library. > which means gnutls.h is included properly. It only helps if I manually define > gnutls_alloc_function gnutls_malloc = malloc; That's pretty strange. A work around could be to simply use malloc() as in the latest versions there is no way to override the gnutls memory functions. That may not be very future proof though. regards, Nikos _______________________________________________ Gnutls-help mailing list [email protected] http://lists.gnupg.org/mailman/listinfo/gnutls-help
