diff --git a/Main.hs b/Main.hs
--- a/Main.hs
+++ b/Main.hs
@@ -74,7 +74,9 @@
   ++ "  outputName = \"" ++ name ++ "\",\n"
   ++ "  targetName = \"" ++ name ++ "\",\n"
   ++ "  srcDir = \"" ++ srcDir ++ "\",\n"
-  ++ "  compileFlags = \"\",\n"
+  ++ "  commonCompileFlags = \"\",\n"
+  ++ "  cCompileFlags = \"\",\n"
+  ++ "  cxxCompileFlags = \"\",\n"
   ++ "  linkFlags = \"\",\n"
   ++ "  outputLocation = ObjAndBinDirs \"obj\" \".\",\n"
   ++ "  includeDirs = [\"" ++ srcDir ++ "\"]\n"
@@ -189,7 +191,8 @@
   D.createDirectoryIfMissing False ".dib"
   needToRebuild <- checkDibTimestamps
   rebuild needToRebuild
-  system $ correctExe ++ " +RTS -N -RTS " ++ args
+  let quotes = if os =="mingw32" then "\"\"" else "" 
+  system $ quotes ++ correctExe ++ quotes ++ " +RTS -N -RTS " ++ args
 
 shouldHandleInit :: [String] -> Bool
 shouldHandleInit args = not (null args) && head args == "--init"
diff --git a/dib.cabal b/dib.cabal
--- a/dib.cabal
+++ b/dib.cabal
@@ -1,5 +1,5 @@
 name:           dib
-version:        0.5.0
+version:        0.6.0
 cabal-version:  >= 1.6
 category:		Development
 build-type:     Simple
diff --git a/src/Dib.hs b/src/Dib.hs
--- a/src/Dib.hs
+++ b/src/Dib.hs
@@ -41,15 +41,35 @@
 -- through the use of @dib --init@. Run the dib executable with no options for more
 -- information on the available templates.
 --
--- The most trivial, do nothing build script looks like the following:
---
+-- An example of using the C Builder to build an executable called "myProject" with
+-- its source code in the "src/" directory is as follows:
+-- 
 -- @
 -- module Main where
+-- 
 -- import Dib
---
--- targets = []
+-- import Dib.Builders.C
+-- import qualified Data.Text as T
+-- 
+-- projectInfo = defaultGCCConfig {
+--   outputName = "myProject",
+--   targetName = "myProject",
+--   srcDir = "src",
+--   compileFlags = "",
+--   linkFlags = "",
+--   outputLocation = ObjAndBinDirs "obj" ".",
+--   includeDirs = ["src"]
+-- }
+-- 
+-- project = makeCTarget projectInfo
+-- clean = makeCleanTarget projectInfo
+-- 
+-- targets = [project, clean]
+-- 
 -- main = dib targets
 -- @
+-- 
+-- This was generated with @dib --init c myProject gcc src@. 
 --
 -- A build script is expected to declare the available 'Target's and then pass them
 -- to the 'dib' function. Only the top-level 'Target's need to be passed to 'dib';
diff --git a/src/Dib/Builders/C.hs b/src/Dib/Builders/C.hs
--- a/src/Dib/Builders/C.hs
+++ b/src/Dib/Builders/C.hs
@@ -3,7 +3,7 @@
 
 -- | A builder for C/C++ code.
 module Dib.Builders.C (
-  CTargetInfo(CTargetInfo, outputName, targetName, srcDir, outputLocation, compiler, linker, archiver, inFileOption, outFileOption, compileFlags, linkFlags, archiverFlags, includeDirs, extraCompileDeps, extraLinkDeps, exclusions, staticLibrary),
+  CTargetInfo(CTargetInfo, outputName, targetName, srcDir, outputLocation, compiler, linker, archiver, inFileOption, outFileOption, commonCompileFlags, cCompileFlags, cxxCompileFlags, linkFlags, archiverFlags, includeDirs, extraCompileDeps, extraLinkDeps, exclusions, staticLibrary),
   BuildLocation(InPlace, BuildDir, ObjAndBinDirs),
   makeCTarget,
   makeCleanTarget,
@@ -52,8 +52,12 @@
   outFileOption :: T.Text,
   -- | The compiler's include option
   includeOption :: T.Text,
-  -- | Compiler flags.
-  compileFlags :: T.Text,
+  -- | Common compiler flags.
+  commonCompileFlags :: T.Text,
+  -- | C compiler flags.
+  cCompileFlags :: T.Text,
+  -- | C++ compiler flags.
+  cxxCompileFlags :: T.Text,
   -- | Linker flags.
   linkFlags :: T.Text,
   -- | Archiver flags.
@@ -89,8 +93,12 @@
         outFileOption info,
         "includeOption",
         includeOption info,
-        "compileFlags",
-        compileFlags info,
+        "commonCompileFlags",
+        commonCompileFlags info,
+        "cCompileFlags",
+        cCompileFlags info,
+        "cxxCompileFlags",
+        cxxCompileFlags info,
         "linkFlags",
         linkFlags info,
         "archiverFlags",
@@ -133,7 +141,9 @@
   inFileOption = "",
   outFileOption = "",
   includeOption = "",
-  compileFlags = "",
+  commonCompileFlags = "",
+  cCompileFlags = "",
+  cxxCompileFlags = "",
   linkFlags = "",
   archiverFlags = "",
   includeDirs = [],
@@ -158,7 +168,7 @@
 -- | A default configuration for g++.
 defaultGXXConfig :: CTargetInfo
 defaultGXXConfig = defaultGCCConfig {
-  compiler = "g++",
+  compiler = "gcc",
   linker = "g++"
   }
 
@@ -194,11 +204,14 @@
 excludeFiles :: [T.Text] -> T.Text -> Bool
 excludeFiles excl file = L.any (`T.isSuffixOf` file) excl
 
+getCorrectCompileFlags :: CTargetInfo -> T.Text -> T.Text
+getCorrectCompileFlags info s = if ".c" `T.isSuffixOf` s then cCompileFlags info else cxxCompileFlags info
+
 -- | Given a 'CTargetInfo', produces a 'Target'
 makeCTarget :: CTargetInfo -> Target
 makeCTarget info =
   let includeDirString = includeOption info `T.append` T.intercalate (" " `T.append` includeOption info) (includeDirs info)
-      makeBuildString s t = T.unpack $ T.concat [compiler info, " ", inFileOption info, " ", s, " ", outFileOption info, " ", t, " ", includeDirString, " ", compileFlags info]
+      makeBuildString s t = T.unpack $ T.concat [compiler info, " ", inFileOption info, " ", s, " ", outFileOption info, " ", t, " ", includeDirString, " ", commonCompileFlags info, " ", getCorrectCompileFlags info s]
       makeLinkString ss t = T.unpack $ T.concat [linker info, " ", T.unwords ss, " ", outFileOption info, " ", t, " ", linkFlags info]
       makeArchiveString ss t = T.unpack $ T.concat [archiver info, " ", archiverFlags info, " ", t, " ", T.unwords ss]
 
diff --git a/src/Dib/Scanners/CDepScanner.hs b/src/Dib/Scanners/CDepScanner.hs
--- a/src/Dib/Scanners/CDepScanner.hs
+++ b/src/Dib/Scanners/CDepScanner.hs
@@ -13,6 +13,7 @@
 import qualified Data.Text as T
 import qualified System.Directory as Dir
 import qualified System.FilePath as F
+import Control.Applicative
 import Control.Monad.State.Lazy
 
 data Dependency = Dependency String String
diff --git a/src/Dib/Types.hs b/src/Dib/Types.hs
--- a/src/Dib/Types.hs
+++ b/src/Dib/Types.hs
@@ -9,6 +9,7 @@
 -- not export any of these types directly; other modules do.
 module Dib.Types where
 
+import Control.Applicative
 import Control.Monad.State as S
 import qualified Data.Map as Map
 import qualified Data.Serialize as Serialize
