[gnutls-help] gnutls compile error with custom application

mammar mammar at gmail.com
Mon Jun 17 09:11:17 CEST 2013


Hi

I want to embed gnutls into my application, currently i am playing with
exmples included with gnutls. Examples work fine. The problem is when i
standalone compile the simple X.509 example at
http://www.gnutls.org/manual/gnutls.html#Echo-server-with-X_002e509-authentication,
i am getting compile errors.

Here is my Makefile

CC=gcc

CFLAGS= -g \
-I./gnutls

CFILES = server_x509.c


LIBS = -lgnutls

all: server

server:
$(CC) $(CFILES) $(CFLAGS) $(LIBS) -o server_x509
clean:
rm -f server_x509


Compile error i am getting

$ make -f Makefile
gcc server_x509.c -g -I./gnutls -lgnutls -o server_x509
/tmp/cc6UmJrw.o: In function `main':
/home/ma1/OS/1GNUTLS/examples/server_x509.c:126: undefined reference to
`gnutls_transport_set_int2'
collect2: error: ld returned 1 exit status
make: *** [server] Error 1

How to fix this error?

So, can anyone tell me how to embed gnutls to an application or is there
any guide available for this?


Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20130617/79365cda/attachment-0001.html>


More information about the Gnutls-help mailing list