AdaCore / gnatcoll-bindings

GNAT Components Collection – Bindings to C libraries
Other
13 stars 15 forks source link

Libiconv issues. #19

Open Blady-Com opened 3 months ago

Blady-Com commented 3 months ago

Some Libiconv implementions define symbols such as iconv_open whereas others define libiconv_open. Currently GNATColl-iconv use iconv_open style in binding support, for instance:

void *gnatcoll_iconv_open(char *tocode, char *fromcode){
  iconv_t res = iconv_open(tocode, fromcode);
  return (res == (iconv_t) -1) ? NULL : res;
}

As it was formerly explained in documentation:

If your application depends on having a working libiconv, you can specify –with-iconv or –with-iconv=PATH to GNATCOLL’s configure.

But configure is no more present.

How can I use Libiconv library with libiconv_open style?

Nikokrock commented 3 months ago

Hi,

On which OS (and distribution) are you ? Which libiconv version are you trying to use ?

Thanks in advance

Blady-Com commented 3 months ago

Hi, my configuration: macOS 13.6, Xcode 14.3, GNAT FSF 13.2 (from Alire). libiconv-1.17 comes from GTK-OSX distribution. I link GNATColl against this version to be compatible with GTKAda which is linked against GTK-OSX. NB: it isn't the native macOS libiconv.