libgnutlsxx link problems

Simon Josefsson simon at josefsson.org
Thu Oct 15 08:34:16 CEST 2009


Boyan Kasarov <bkasarov at gmail.com> writes:

> Here is patch to export the names in more proper way:
>
> diff --git a/lib/libgnutlsxx.map b/lib/libgnutlsxx.map
> index 62f6c12..f61d861 100644
> --- a/lib/libgnutlsxx.map
> +++ b/lib/libgnutlsxx.map
> @@ -24,11 +24,18 @@ GNUTLS_1_6
>  {
>    global:
>      extern "C++" {
> -      gnutls::*;
> -  };
> +      # To specify a class we also need to specify its typeinfo,
> +      # typeinfo name and vtable objects.
> +      # For example for class gnutls::psk_client_credentials,
> +      # we need to declare this 4 lines:
> +      #
> +      # gnutls::psk_client_credentials::*;
> +      # "typeinfo for gnutls::psk_client_credentials";
> +      # "typeinfo name for gnutls::psk_client_credentials";
> +      # "vtable for gnutls::psk_client_credentials";
>  
> -  # export typeinfo names and structures
> -  _ZTI*;
> +      *gnutls::*;
> +  };
>  
>    local: *;
>  };

Applied.

> As you see specifying what to export from version script is somehow not
> flexible for C++, and it does not work well on all platforms, I can
> implement solution like in
> http://www.gnu.org/software/gnulib/manual/gnulib.html#Exported-Symbols-of-Shared-Libraries , the 3th solution.

I think that is the right solution, so it would be great.  The best is
to start use it for the C++ library first and not couple this with doing
the same change for the C library.  So please look into creating a patch
to use it for the C++ library first.

Thanks,
/Simon





More information about the Gnutls-devel mailing list