This page is about compiling libspellcheck v1.15. If you would like the documentation on this subject for the most recent version of libspellcheck (v1.20), please go to Compiling Libspellcheck.

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.

Before you start the build process: check that the directory /usr/etc exists. If not, create it.

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, go here
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 Jul 31, 2013 at 2:02 PM by iankbhb, version 3


No comments yet.