C language interface

Help
2007-08-16
2013-06-03
  • Zoltan Bartko
    Zoltan Bartko
    2007-08-16

    Hello devs,

    I am using Hunspell in java through JNA (java native interface, http://jna.dev.java.net\). It can connect to libraries written in C or having a C interface.

    1. I convinced MSVC 2005 Express to create a DLL from the sources in src/hunspell. However, it doesn't export the C language interface (the Hunspell_* functions in hunspell.h). I had to add __declspec ( dllexport ) before each C function definition in hunspell.h . Now it works.

    2. The C library interface is missing Hunspell_put_word() (the equivalent of put_word()):

    int Hunspell_put_word(Hunhandle *pHunspell, const char* word) {
        return ((Hunspell*) pHunspell)->put_word(word);
    }

    Thanks for your time and keep up the good work.

    Zoltan

    PS: I could have used Hungarian but I am not sure others would understand that

     
    • Hi,

      Many thanks for your mail. Also put_word_pattern() is missing from C API. (This function is especially useful for languages with a lot of affixes.)

      I suggest to use Hungarian in private mails addressed to me or on magyarispell mailing list
      (magyarispell.yahoogroups.com).

      Thanks,

      Laci