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
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/*
, 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.