Compiling gnutls example in Ubuntu 11.10 64 bits

Alfredo Esteban aedelatorre at gmail.com
Sun Apr 22 01:42:38 CEST 2012


I'trying to compile a very simple program to load a pkcs12 file using gnutls.

libgnutls26 is found by ld (no "not found error") but not symbols.

> gcc -lgnutls ejemplo.c
/tmp/ccKyg1zu.o: In function `main':
ejemplo.c:(.text+0x149): undefined reference to `gnutls_global_init'
ejemplo.c:(.text+0x15c): undefined reference to `gnutls_strerror'
ejemplo.c:(.text+0x182): undefined reference to `gnutls_global_init_extra'
ejemplo.c:(.text+0x195): undefined reference to `gnutls_strerror'
ejemplo.c:(.text+0x1bd): undefined reference to `gnutls_pkcs12_init'
ejemplo.c:(.text+0x1d0): undefined reference to `gnutls_strerror'
ejemplo.c:(.text+0x25d): undefined reference to `gnutls_pkcs12_import'
ejemplo.c:(.text+0x29c): undefined reference to `gnutls_pkcs12_verify_mac'
collect2: ld devolvió el estado de salida 1

[00:47:32] [alfredo at portatil] ~/gnutls-crackpkcs12/ejemplo
> dpkg -l | grep gnutls
ii  libcurl3-gnutls                        7.21.6-3ubuntu3.2
            Multi-protocol file transfer library (GnuTLS)
ii  libgnutls-dev                          2.10.5-1ubuntu3.1
            the GNU TLS library - development files
ii  libgnutls26                            2.10.5-1ubuntu3.1
            the GNU TLS library - runtime library
ii  libgnutls26:i386                       2.10.5-1ubuntu3.1
            the GNU TLS library - runtime library
ii  libgnutlsxx26                          2.10.5-1ubuntu3.1
            the GNU TLS library - C++ runtime library
ii  libneon27-gnutls                       0.29.6-1
            HTTP and WebDAV client library (GnuTLS enabled)

> more /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.10
DISTRIB_CODENAME=oneiric
DISTRIB_DESCRIPTION="Ubuntu 11.10"

> uname -a
Linux portatil 3.0.0-17-generic #30-Ubuntu SMP Thu Mar 8 20:45:39 UTC
2012 x86_64 x86_64 x86_64 GNU/Linux

Thanks in advance,

Alfredo




More information about the Gnutls-help mailing list