ASpell dictionaries to work with FB Example

External libraries (GTK, GSL, SDL, Allegro, OpenGL, etc) questions.
Post Reply
Imortis
Moderator
Posts: 1924
Joined: Jun 02, 2005 15:10
Location: USA
Contact:

ASpell dictionaries to work with FB Example

Post by Imortis »

Does anyone have an aspell dictionary file that works with the example found here: https://www.freebasic.net/wiki/ExtLibaspell

I have downloaded several files that all give an error when attempting to run the example. I either get this error:
en_CA.multi:2: The key "strip-accents" is unknown.
or this error:
en-common.rws" can not be opened for reading.
Any help would be appreciated.
jj2007
Posts: 2326
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: ASpell dictionaries to work with FB Example

Post by jj2007 »

Code: Select all

ld.exe: cannot find -laspell
Where is the dll? I've searched a lot on the web, out of curiosity, but it seems there are no binaries around.
Imortis
Moderator
Posts: 1924
Joined: Jun 02, 2005 15:10
Location: USA
Contact:

Re: ASpell dictionaries to work with FB Example

Post by Imortis »

jj2007 wrote:

Code: Select all

ld.exe: cannot find -laspell
Where is the dll? I've searched a lot on the web, out of curiosity, but it seems there are no binaries around.
Yeah, it looks like you are diving down the same rabbit hole I did. I had to dig to find them as well. If you want I can post a download link for all the libs needed. Can't seem to get the 64bit pthread lib to work though. It just crashes. 32bit works fine though.
jj2007
Posts: 2326
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: ASpell dictionaries to work with FB Example

Post by jj2007 »

Please go ahead! Where did you find the dll?
Mysoft
Posts: 836
Joined: Jul 28, 2005 13:56
Location: Brazil, Santa Catarina, Indaial (ouch!)
Contact:

Re: ASpell dictionaries to work with FB Example

Post by Mysoft »

ok... where i do start... first i will use the old version of it as i think the .bi expect that version.... AND... the newer version does not have windows binaries... so one would need to compile that to even try... and i wont do that, so lets work with what we have...

since aspell have installers for windows... on that site, and the program is meant to be installed and have those dictionary used in your program...
then to get it working you have

0) the sample .bas is here https://www.freebasic.net/wiki/ExtLibaspell
1) install the full installer from here: http://www.aspell.net/win32
2) install the dictionary you wants from that same link (the sample requires the english one aspell-en-0.50-2-3.exe)
3) download the development libraries from that same link i.e. the aspell-dev-0-50-3-3.zip from bottom
4) now... the installer does not add aspell to path automatically... so you must do it on control panel to add the "bin" folder of aspell to path... like by default it would be c:\program files\aspell\bin
5) if you are using an IDE to compile and run... dont forget you have to close and reopen the IDE... for the path environment variable to be updated... otherwise if you compile and run from the IDE, aspell wont yet be on path and it will fail to find the dictionary.
6) extract the aspell-15.a from the aspell-dev-0-50-3-3.zip and rename it to aspell.a, and put the .a either on the folder you have the aspell sample .bas, or put it on freebasic\lib\win32 folder
7) the aspell.bi have a line with #inclib "libpthread" but that is not required for that version... so either get libpthread.a from mingw or comment that line on aspell.bi
8) compile the aspell.bas sample and be happy!

some point of interest... the way it works is that it gets the path that the aspell-15.dll is... and it tries to locate the data/dictionary relative to that i.e. ../data/* and ../dict/*, so if you want to have a standalone version that wont require installing aspell... you can copy the data/dict folders from the installed aspell to your program folder... on this structure:

Code: Select all

app\bin\aspell.exe      '(the sample compiled from .bas)
app\bin\aspell-15.dll   '(copied from the installed aspell)
app\data\*              '(copied from the installed aspell)
app\dic\*               '(copied from the installed aspell)
and then it will work without requiring install aspell or adding the aspell\bin path to the environment variable.
Post Reply