diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -14,7 +14,15 @@
 AC_CHECK_HEADERS([stddef.h stdint.h stdlib.h string.h unistd.h])
 AC_CHECK_LIB([dl], [main])
 
-AC_SUBST(FLTKCONFIGCOMMAND,"$(fltk-config --ldflags --use-gl --use-glut --use-images --use-forms) -lstdc++")
+case $host_os in
+   mingw* )
+      AC_SUBST(FLTKCONFIGCOMMAND,"$(fltk-config --ldflags --use-gl --use-glut --use-images --use-forms) -lstdc++")
+      ;;
+   *)
+      AC_SUBST(FLTKCONFIGCOMMAND,"$(fltk-config --ldstaticflags --use-gl --use-glut --use-images --use-forms) -lstdc++")
+      ;;
+esac
+
 AC_SUBST(FLTK_HOME,`fltk-config --includedir`)
 # Checks for typedefs, structures, and compiler characteristics.
 AC_TYPE_SIZE_T
diff --git a/fltkhs.cabal b/fltkhs.cabal
--- a/fltkhs.cabal
+++ b/fltkhs.cabal
@@ -1,5 +1,5 @@
 name : fltkhs
-version : 0.5.0.4
+version : 0.5.0.5
 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.
@@ -159,9 +159,9 @@
    ghc-Options: -optl-mwindows
    ghc-Options: -pgml g++ "-optl-Wl,--whole-archive" "-optl-Wl,-Bstatic" "-optl-Wl,-lfltkc" "-optl-Wl,-Bdynamic" "-optl-Wl,--no-whole-archive"
   if os(darwin)
-   ghc-Options: -pgml g++ "-optl-Wl,-lfltkc"
+   ghc-Options: "-optl-Wl,-lfltkc"
   if !os(darwin) && !os(windows)
-    ghc-Options: -pgml g++ "-optl-Wl,--whole-archive" "-optl-Wl,-Bstatic" "-optl-Wl,-lfltkc" "-optl-Wl,-Bdynamic" "-optl-Wl,--no-whole-archive"
+   ghc-Options: -pgml g++ "-optl-Wl,--whole-archive" "-optl-Wl,-Bstatic" "-optl-Wl,-lfltkc" "-optl-Wl,-Bdynamic" "-optl-Wl,--no-whole-archive"
 
 Executable fltkhs-buttons
   Main-Is: Buttons.hs
diff --git a/src/Graphics/UI/FLTK/LowLevel/FLTKHS.hs b/src/Graphics/UI/FLTK/LowLevel/FLTKHS.hs
--- a/src/Graphics/UI/FLTK/LowLevel/FLTKHS.hs
+++ b/src/Graphics/UI/FLTK/LowLevel/FLTKHS.hs
@@ -574,7 +574,7 @@
 -- The `brew` package for the current stable release of FLTK is broken. Fortunately installing from source is pretty
 -- quick and painless.
 --
-
+--
 -- @
 -- > wget http://fltk.org/pub/fltk/1.3.4/fltk-1.3.4-1-source.tar.gz
 -- > tar -zxf fltk-1.3.4-1-source.tar.gz
@@ -584,7 +584,7 @@
 -- > sudo make install
 -- > fltk-config --version
 -- 1.3.4-1
---
+-- @
 --
 -- == Download & Install the FLTKHS Hello World Skeleton
 -- === Downloading Without Git
