[Help-gnutls] Re: GnuTLS program not compiling on Windows

Bejoy Abraham Mathews bejnet at yahoo.com
Sun Feb 8 06:05:53 CET 2009


$ gcc -o foo foo.c -I/cygdrive/c/Program\ Files/GnuTLS-2.7.3/include/ /cygdrive/c/Program\ Files/GnuTLS-2.7.3/lib/libgnutls.dll.a
gcc.exe: /cygdrive/c/Program\ Files/GnuTLS-2.7.3/lib/libgnutls.dll.a: No such file or directory

This is what I get if I remove the "-L"
Bejoy



________________________________
From: Simon Josefsson <simon at josefsson.org>
To: Bejoy Abraham Mathews <bejnet at yahoo.com>
Cc: help-gnutls at gnu.org
Sent: Saturday, 7 February, 2009 9:56:11 PM
Subject: Re: GnuTLS program not compiling on Windows

Bejoy Abraham Mathews <bejnet at yahoo.com> writes:

> Hi 
>
> I have followed the steps on http://www.josefsson.org/gnutls4win/. Installation got over without any extra assistance. But foo.c is not getting compiled as it is not able to reader the header file(gnutls\gnutls.h "or gnutls\compat.h - once gnutls.h path is mentioned"). 
>
> bejoy at josnet ~
> $ gcc -o foo foo.c -I/cygdrive/c/Program\ Files/GnuTLS-2.7.3/include/ /cygdrive/c/Program\ Files/GnuTLS-2.7.3/lib/libgnutls.dll.a
> gcc.exe: /cygdrive/c/Program Files/GnuTLS-2.7.3/lib/libgnutls.dll.a: No such file or directory
> foo.c:1:27: gnutls/gnutls.h: No such file or directory
> foo.c: In function `main':
> foo.c:4: error: `NULL' undeclared (first use in this function)
> foo.c:4: error: (Each undeclared identifier is reported only once
> foo.c:4: error: for each function it appears in..)
>
>
> If I provide the complete path(Eg. C:\Program Files\GnuTLS-2..7.3\include\gnutls\gnutls.h), it shows error for full path for compat.h inside gnutls.h file
>
> $ gcc -o foo foo.c -I/cygdrive/c/Program\ Files/GnuTLS-2.7.3/include/ -L/cygdrive/c/Program\ Files/GnuTLS-2.7.3/lib/libgnutls.dll.a
> In file included from foo.c:1:
> C:\Program Files\GnuTLS-2.7..3\include\gnutls\gnutls.h:48:64: gnutls/compat.h: No such file or directory
> In file included from foo.c:1:
> C:\Program Files\GnuTLS-2.7.3\include\gnutls\gnutls.h:754: error: syntax error before '*' token
>
> After correcting the path to compat.h in gnutls.h, I get the following error
>
> $ gcc -o foo foo.c -I/cygdrive/c/Program\ Files/GnuTLS-2.7.3/include/ -L/cygdrive/c/Program\ Files/GnuTLS-2.7.3/lib/libgnutls.dll.a
> C:\DOCUME~1\bejoy\LOCALS~1\Temp/ccMPmztm.o:foo.c:(.text+0x32): undefined referece to `gnutls_check_version'
> collect2: ld returned 1 exit status
>
> I tried Cygwin and MinGW environments. Same error...!!!
>
> Could you please someone help me correct this error?

The last error is a link error, which should be solved if you just
remove the two characters '-L' that you added.

/Simon



      Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20090208/56e0e496/attachment.htm>


More information about the Gnutls-help mailing list