This page is about compiling libspellcheck v1.20. If you would like the documentation on this subject for ibspellcheck (v1.15), please go to Compiling Libspellcheck (v1.15). However, we do reccomend you upgrade to v1.20, as libspellcheck and spellcheck now support providing correct spelling suggestions for misspelled words.

Compiling Libspellcheck (x86 and x86_64)

Due to problems with 64 bit computers, this library MUST be built as a 32 bit library. In order to force a 32-bit build you must have the G++ Multilib Files (g++-multilib in Ubuntu).

If you have a x86_64 machine, read the 64 bit notes below once you're done compiling. They contain important information on how to build applications that use libspellcheck on 64 bit machines.

You no longer have to create the directory /usr/etc/. The default dictionary "english.dict" is now stored in the /etc directory

Getting The Source

Libspellcheck uses GIT for source code management. To clone into our git repository, do:

$ git clone

If you would rather download a tar.gz archive, download: libspellcheck v1.20 source

Building Libspellcheck

Change into the directory

$ cd libspellcheck

Then, make and install

$ make
$ sudo make install

Note that this also compiles the spellcheck application, which is explained here: Spellcheck.

If you would like to get rid of all object files in the libspellcheck directory:

$ make clean


In Documentation, it is described that only one compiler option (-lspellcheck) is needed to build applications with libspellcheck. While this is true on 32 bit machines, this is not true on 64 bit machines. Here's how you build an application with libspellcheck on 64 bit machines:

$ g++ -m32 -o myapp myapp.cpp -lspellcheck

The -m32 option is required because you can't link a 64 bit application against a 32 bit library.

Last edited Aug 8, 2013 at 3:32 PM by iankbhb, version 7


No comments yet.