diff --git a/Setup.hs b/Setup.hs
--- a/Setup.hs
+++ b/Setup.hs
@@ -123,10 +123,13 @@
                    cygpath o p = removeTrailingNewline<$>(rawSystemStdout normal "cygpath" [o,  p])
                in
                do
-                 fullMingwPath <- cygpath "-m" "/mingw64"
+                 let mingw = case buildArch of
+                       I386 -> "/mingw32"
+                       _ -> "/mingw64"
+                 fullMingwPath <- cygpath "-m" mingw
                  ghcPath <- rawSystemStdout normal "sh" ["-c", "which ghc"]
                  cppGccPthreadPaths <- mapM (cygpath "-w") (stdCppGccPthreadPaths ghcPath)
-                 let replaceMingw = replaceAllInfixes "/mingw64" fullMingwPath
+                 let replaceMingw = replaceAllInfixes mingw fullMingwPath
                  let fixedLib = maybe Nothing
                                      (\(ld, incDirs) ->
                                           fmap (\l' -> l' {
diff --git a/fltkhs.cabal b/fltkhs.cabal
--- a/fltkhs.cabal
+++ b/fltkhs.cabal
@@ -1,5 +1,5 @@
 name : fltkhs
-version : 0.5.0.7
+version : 0.5.0.8
 synopsis : FLTK bindings
 description:
     Low level bindings for the FLTK GUI toolkit. For installation and quick start instruction please scroll all the way down to the README.
