Previous: Upgrading from a pre-0.50 snapshot, Up: Installing



E.6 WIN32 Notes

E.6.1 Getting the WIN32 version

The latest version of the native Aspell/WIN32 port can be found at http://aspell.net/win32.

E.6.2 Building the WIN32 version

There are two basically different ways of building Aspell using GCC for WIN32: You can either use the Cygwin compiler, which will produce binaries that depend on the posix layer in cygwin1.dll. The other way is using MinGW GCC, those binaries use the native C runtime from Microsoft (MSVCRT.DLL). If you intend to use or link against the Aspell libraries using a native WIN32 compiler (e.g. MS Visual C++), you will need the MinGW built ones to avoid problems caused by the different runtime libraries.

Building Aspell using Cygwin: This works exactly like on other POSIX compatible systems using the configure && make && make install cycle. Some versions of Cygwin GCC will fail to link, this is caused by an incorrect libstdc++.la in the /lib directory. After removing or renaming this file, the build progress should work (GCC-2.95 and GCC-3.x should work).

Building Aspell using MinGW: To compile Aspell with the MinGW compiler, you will need at least GCC-3.2 (as shipped with MinGW-2.0.3) and some GNU tools like rm and cp. The origin of those tools doesn't matter, it has shown to work with any tools from MinGW/MSys, Cygwin or Linux. To build Aspell, move into the win32 subdirectory and type make. You can enable some additional build options by either commenting out the definitions at the head of the Makefile or passing those values as environment variables or at the make command line. Following options are supported:

DEBUGVERSION
If set to "1", the binaries will include debugging information (resulting in a much bigger size).
CURSESDIR
Enter the path to the pdcurses library here, in order to get a nicer console interface (see below).
MSVCLIB
Enter the filename of MS lib.exe here, if you want to build libraries that can be imported from MS Visual C++.
WIN32_RELOCATABLE
If set to "1", Aspell will detect the prefix from the path where the DLL resides (see below for further datails).
TARGET
Sets a prefix to be used for cross compilation (e.g. /usr/local/bin/i586-mingw32msvc- to cross compile from Linux).

There are also a MinGW compilers available for Cygwin and Linux, both versions are able to compile Aspell using the prebuilt Makefile. While the Cygwin port automatically detects the correct compiler, the Linux version depends on setting the TARGET variable in the Makefile (or environment) to the correct compiler prefix.

Other compilers may work. There is a patch for MS Visual C++ 6.0 available at ftp://ftp.gnu.org/gnu/aspell, but it needs a lot of changes to the Aspell sources. It has also been reported that the Intel C++ compiler can be used for compilation.

E.6.3 (PD)Curses

In order to get the nice full screen interface when spell checking files, a curses implementation that does not require Cygwin is required. The PDCurses (http://pdcurses.sourceforge.net) implementation is known to work, other implementations may work however they have not been tested. See the previous section for information on specifying the location of the curses library and include file.

Curses notes:

E.6.4 Directories

If Aspell is compiled with WIN32_RELOCATABLE=1, it can be run from any directory: it will set prefix according to its install location (assuming it resides in prefix\\bin). Your personal wordlists will be saved in the prefix directory with their names changed from .aspell.lang.* to lang.* (you can override the path by setting the HOME environment variable).

E.6.5 Installer

The installer registers the DLLs as shared libraries, you should increase the reference counter to avoid the libraries being uninstalled if your application still depends on them (and decrease it again when uninstalling your program). The reference counters are located under:

     HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs

The install location and version numbers are stored under

     HKLM\SOFTWARE\Aspell

E.6.6 WIN32 consoles

The console uses a different encoding than GUI applications, changing this to to a Windows encoding (e.g. 1252) is not supported on Win9x/Me. On WinNT (and later) those codepages can be set by first changing the console font to lucida console, then changing the codepage using chcp 1252.

Some alternative shells (e.g. MSys' rxvt or Cygwin's bash) do a codepage conversion (if correctly set up), so running Aspell inside those shells might be a workaround for Win9x.