help-gnutls
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Error compiling a example code ("undefined reference to tcp_connect and


From: Pedro Pereira
Subject: Error compiling a example code ("undefined reference to tcp_connect and tcp_close")
Date: Mon, 10 May 2010 17:08:25 +0300
User-agent: Internet Messaging Program (IMP) H3 (4.3.5)

Hi all,

I am beginning with gnutls for the first time.
I have already installed every libraries and gnutls.
For now I am trying to compile a simple example that is available in the manual, "Simple Client Example with Anonymous Authentication":
http://www.gnu.org/software/gnutls/manual/html_node/Simple-client-example-with-anonymous-authentication.html#Simple-client-example-with-anonymous-authentication

I am just compiling adding the -lgnutls, and I receive some errors. the following output:

$ gcc -o foo foo.c -lgnutls
/tmp/ccnYRTg5.o: In function `main':
foo.c:(.text+0x73): undefined reference to `tcp_connect'
foo.c:(.text+0x22e): undefined reference to `tcp_close'
collect2: ld returned 1 exit status

It seems that the functions tcp_connect and tcp_close are not found inside the gnutls library..
Can someone help me to compile this example?

Kind Regards,
Pedro




reply via email to

[Prev in Thread] Current Thread [Next in Thread]