The following are notes on building enchant and its dependencies using MSVC 2005. Enchant depends on glib (http://www.gtk.org/) Glib depends on libiconv (http://www.gnu.org/software/libiconv/) and libintl (http://www.gnu.org/software/gettext/) Glib passes file handles to clients. Libiconv takes a file pointer (in fprintf) from clients. Because these are CRT resources, it is very important that the version of the C runtime library be the same for glib and any dlls that use it. See http://msdn2.microsoft.com/en-us/library/abx4dbyh(vs.80).aspx and http://msdn2.microsoft.com/en-us/library/ms235460(VS.80).aspx for more information. If you see a Debug Assertion Failed (_osfile(fh) & FOPEN) this is because a file is opened using one runtime and read using another. Because libenchant does not expose any CRT boundaries, (no file handles, locales, or environment variables passed to clients, and no CRT allocated pointers that will be free'd by clients, except when the free method is provided in the library) it can be linked with applications that do not use the same CRT. The same is true of libenchant and the providers. Due to the fact that a provider may also link to glib, we will explicitly name our glib with a new CRT so that others can coexist. This means you need to compile glib and libintl yourself instead of using Tor Lillqvist's prebuilt libraries (http://www.gimp.org/~tml/gimp/win32/downloads.html) since they use MSVCRT.DLL. (You can use the prebuilt ones for libiconv, but I've included instructions for that as well.) For people concerned that the use of any runtime library other than MSVCRT.DLL would invalidate the GPL see http://www.gnu.org/licenses/gpl-faq.html#WindowsRuntimeAndGPL I successfully built using libiconv-1.9.1, gettext-0.14.5, and glib-2.14.2 libiconv and libintl are codependent so you need to follow the instructions in libiconv's README.woe32, in summary: For release - build libiconv with "nmake -f Makefile.msvc NO_NLS=1 DLL=1 MFLAGS=-MD" (I got errors: 6 unresolved externals like unresolved external symbol __imp____libiconv_version referenced in function _print_version. But those were errors with building iconv_no_i18n.exe which isn't required for the next steps so can safely be ignored.) - install libiconv with "nmake -f Makefile.msvc DLL=1 MFLAGS=-MD install" (This will produce a set of files in c:\usr.) - build libintl with "nmake -f Makefile.msvc DLL=1 MFLAGS=-MD" - install libintl with "nmake -f Makefile.msvc DLL=1 MFLAGS=-MD install" - build libiconv again with "nmake -f Makefile.msvc DLL=1 MFLAGS=-MD check" - install libiconv again with "nmake -f Makefile.msvc DLL=1 MFLAGS=-MD install" For debug: - build libiconv with "nmake -f Makefile.msvc NO_NLS=1 DLL=1 MFLAGS=-MDd PREFIX=c:\usr-debug" - install libiconv with "nmake -f Makefile.msvc DLL=1 MFLAGS=-MDd PREFIX=c:\usr-debug install" (This will produce a set of files in c:\usr.) - build libintl with "nmake -f Makefile.msvc DLL=1 MFLAGS=-MDd PREFIX=c:\usr-debug" - install libintl with "nmake -f Makefile.msvc DLL=1 MFLAGS=-MDd PREFIX=c:\usr-debug install" - build libiconv again with "nmake -f Makefile.msvc DLL=1 MFLAGS=-MDd PREFIX=c:\usr-debug check" - install libiconv again with "nmake -f Makefile.msvc DLL=1 MFLAGS=-MDd PREFIX=c:\usr-debug install" add a manifest to iconv.dll and intl.dll mt iconv.dll.manifest -outputresource:iconv.dll glib has a VC2005 solution (build\win32\vs8) that can be used to build it currently it has issues so we will do the bare minimum to build glib.dll and gmodule.dll copy libintl.h and iconv.h from c:\usr\include to glib-2.14.2\ (base directory) copy iconv.lib and intl.lib from c:\usr\lib to glib-2.14.2\build\win32\vs8\lib\release run the glib makefile in the glib directory to generate the glib.def file "nmake -f makefile.msc glib.def" build the pcre library from the makefile.msc (after removing the -DEBCDIC=0 line and adding -I . ) add glib\gsequence.c, glib\gregex.c to the glib project add ..\..\..\glib\pcre to the libpath and add pcre.lib to the list of libraries with debug version, I was getting two copies of the runtime (debug and release) so had to explicitly tell it to ignore the release version of the library (msvcrt.lib) copy iconv.dll and intl.dll from c:\usr\bin to enchant\lib\glib\release copy libglib-2.0-0-vs8.dll and libgmodule-2.0-0.dll to enchant\lib\glib\release copy glib-2.0-vs8.lib and gmodule-2.0-vs8.lib to enchant\lib\glib\lib\release do the same as above for debug When distributing, be sure to include: msvcm80.dll msvcp80.dll msvcr80.dll Microsoft.VC80.CRT.manifest (these are included in vcredist_x86.exe and Microsoft_VC80_CRT_x86.msm) intl.dll iconv.dll libglib-2.0-0-vs8.dll libgmodule-2.0-0-vs8.dll libenchant.dll (any providers and their dependencies)