My own TLS Extension - Hello World :-)

lfinsto at lfinsto at
Fri Apr 23 15:35:05 CEST 2010

On Fri, April 23, 2010 3:11 pm, Carolin Latze wrote:
> The function itself is defined in lib/gnutls_helloworld.c. Furthermore I
added gnutls_helloworld.c to lib/ Running make and make
install does not show any problems but when I try to call
> gnutls_helloworld_set_msg in my client application, I run into linker
> undefined reference to `gnutls_helloworld_set_msg'
> However when I run nm with my GnuTLS library, gnutls_helloworld_set_msg
is listed.
> Does anybody have an idea whats going wrong here? I assume I missed on
modification that is needed to export API methods, but I have no idea
where.... Any help would be appreciated.

Is the linker finding your modified version of the library?
Are the environment variables `LDFLAGS', `LIBS', `LIBPATH' and
`LD_LIBRARY_PATH' set appropriately?

`LIBPATH' may not be used, I don't know, and `LD_LIBRARY_PATH' is used at
run-time, but it doesn't hurt to set them to sensible values.

This is what `configure --help' has to say on the subject:

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir>
              you have headers in a nonstandard directory <include dir>
  PKG_CONFIG  path to pkg-config utility
  CPP         C preprocessor
  CXX         C++ compiler command
  CXXFLAGS    C++ compiler flags
  CXXCPP      C++ preprocessor

Laurence Finston

More information about the Gnutls-help mailing list