Copyright Richard Jones May 2002
This spell checker creates a library file, librspell.so.
Building the library
To build the rspell library, cd to the rspell directory, copy the Makefile.<system> to Makefile, and type "make".
Important
The default makefile builds the library with the debug option ON. This is because it provides information on the library that will enable the user to tweak the hash function to be the best for the particular word set. It is printed out when the dictionary is deleted. To turn off the debug option, read the instuction in the make file.
Using the library
In your program you will need to #include "rspell.h"
Add "-I/path/to/directory/with/rspell.h/in/it" to your compile line. (Alternatively, copy the rspell.h file to the location of the other include files on your machine, often "/usr/include".)
To link to the library, you need to put "-L /path/to/dir/with/librspell.so/in/it -lrspell" on the compile line. (Unless you have run ldconfig-see below)
See the example Makefile to see this in operation.
Finding the library at run time
Copy librspell.so to a general location (eg /opt/custom/lib)
and set the environment variable
LD_LIBRARY_PATH to point to this location.
You can do this as follows, depending on your shell:
bash: (edit .bashrc)
sh/ksh: (edit .profile)
.......................
add the line:
LD_LIBRARY_PATH= $LD_LIBRARY_PATH":/opt/custom/lib"
export LD_LIBRARY_PATH
csh: (edit .cshrc)
trcsh: (edit .tcshrc)
......................
add the line:
setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH":/opt/custom/lib"
Alternatively
Under Linux, you do not need to set LD_LIBRARY_PATH if you have root access.
As the root user,
copy the librspell.so to /usr/lib
run /sbin/ldconfig
The library will then be available for use.
Documentation
Documentation is in the docs directory. The design docs explain why various
options were chosen, and are in OpenOffice.org format. See www.openoffice.org
to get this amazing Office Suite.
The syntax and use of the RSpell functions are descibed in the HTML document.
An example of how to use it can be found in the example directory.
Bugs and Questions
Please contact me on rich@ricksoft.co.uk or fill in the feedback form on
www.ricksoft.co.uk.
I cannot check the email as frequently as I'd like, but will attempt to reply
to all emails recieved.
