1

The following link states the cygwin method to install hunspell on windows: https://github.com/hunspell/hunspell

The executable installed has unix like dictionary search path as follows:

$ hunspell.exe -D

SEARCH PATH: .::/usr/share/hunspell:/usr/share/myspell:/usr/share/myspell/dicts:/Library/Spelling:/home/nchaturv/.openoffice.org/3/user/wordbook:/home/nchaturv/.openoffice.org2/user/wordbook:/home/nchaturv/.openoffice.org2.0/user/wordbook:/home/nchaturv/Library/Spelling:/opt/openoffice.org/basis3.0/share/dict/ooo:/usr/lib/openoffice.org/basis3.0/share/dict/ooo:/opt/openoffice.org2.4/share/dict/ooo:/usr/lib/openoffice.org2.4/share/dict/ooo:/opt/openoffice.org2.3/share/dict/ooo:/usr/lib/openoffice.org2.3/share/dict/ooo:/opt/openoffice.org2.2/share/dict/ooo:/usr/lib/openoffice.org2.2/share/dict/ooo:/opt/openoffice.org2.1/share/dict/ooo:/usr/lib/openoffice.org2.1/share/dict/ooo:/opt/openoffice.org2.0/share/dict/ooo:/usr/lib/openoffice.org2.0/share/dict/ooo

AVAILABLE DICTIONARIES (path is not mandatory for -d option):

The paths above are unix paths and not windows paths. And there is no default dictionary So, I have to add the dictionary en_US.dic to the search path.

Is there a way to add some path to the search lib path while configuring or building? I tried using the following but it did not work out.

export LDFLAGS='-L/home/foo/sw/lib/'

I do not get the dictionary not present error if I have the en_US.dic file in the folder I am running hunspell from. But, I would like to add a path to the search path and place the dictionary and affix files there.

NmN
  • 31
  • 2
  • LDFLAGS is only usefult for compilation of a program. The cygwin Hunspell program has the dictionary under `/usr/share/myspell` – matzeri Jun 19 '20 at 12:27

1 Answers1

0

Interpreting the source code at https://github.com/hunspell/hunspell/blob/master/src/tools/hunspell.cxx#L2040-L2072, you can use DICPATH to add a directory at runtime. Some of the directories are derived from HOME, but with hard-coded suffixes. There doesn't seem to be any means of changing any of the other directories at configure- or buildtime, save for patching the source code.

David Macek
  • 868
  • 4
  • 10