[gnutls-help] Using gnutls_malloc()

Vladimir Levijev vladimir.levijev at gmail.com
Wed Mar 25 11:10:12 CET 2015

On 24 March 2015 at 10:17, Nikos Mavrogiannopoulos <nmav at gnutls.org> wrote:
> On Mon, Mar 23, 2015 at 5:52 PM, Vladimir Levijev
> <vladimir.levijev at gmail.com> 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.

I have installed mingw and indeed had no issues there. However, I
wasn't able to link my program with GnuTLS statically (see attached
picture). Is it not possible or am I doing something wrong? I really
need a way to link with GnuTLS statically.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: hellognutls.jpg
Type: image/jpeg
Size: 30884 bytes
Desc: not available
URL: </pipermail/attachments/20150325/829afabe/attachment-0001.jpg>

More information about the Gnutls-help mailing list