[Help-gnutls] GnuTLS program not compiling on Windows

Bejoy Abraham Mathews bejnet at yahoo.com
Sat Feb 7 19:12:52 CET 2009


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?

Thank you.


With Regards
Bejoy


      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/20090207/c67fa1c9/attachment.htm>


More information about the Gnutls-help mailing list