error in compiling GnuTLS example

Peter Penzov peter.penzov at gmail.com
Mon Feb 27 23:38:32 CET 2012


Hi,
  I use Centos with GnuTLS version gnutls-2.8.5-4.el6.x86_64. I trying to
compile the example ex-serv-x509.c.
When I try to compile it using this command: gcc -o server ex-serv-x509.c
-lgnutls

I get this error:
ex-serv-x509.c: In function ‘generate_dh_params’:
ex-serv-x509.c:57: error: ‘GNUTLS_PK_DH’ undeclared (first use in this
function)
ex-serv-x509.c:57: error: (Each undeclared identifier is reported only once
ex-serv-x509.c:57: error: for each function it appears in.)
ex-serv-x509.c:57: error: ‘GNUTLS_SEC_PARAM_LOW’ undeclared (first use in
this function)
ex-serv-x509.c: In function ‘main’:
ex-serv-x509.c:137: warning: cast to pointer from integer of different size

How I can fix this error?

Best wishes
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20120228/34632e9e/attachment.htm>


More information about the Gnutls-help mailing list