title: Error when compiling mono on windows: i686-pc-mingw32/bin/ld: cannot find -ldl
body: <p>I am trying to compile <a href="https://github.com/mono/mono" rel="nofollow">mono</a> on windows using cygwin, however when I run <code>make</code> it eventually stops with the following error</p>
  
  <pre><code>make[3]: Entering directory '/cygdrive/c/Projects/mono/mono/metadata'
    CCLD     pedump.exe
  /usr/lib/gcc/i686-pc-mingw32/4.7.3/../../../../i686-pc-mingw32/bin/ld: cannot find -ldl
  collect2: error: ld returned 1 exit status
  Makefile:1303: recipe for target 'pedump.exe' failed
  make[3]: *** [pedump.exe] Error 1
  make[3]: Leaving directory '/cygdrive/c/Projects/mono/mono/metadata'
  Makefile:434: recipe for target 'all-recursive' failed
  make[2]: *** [all-recursive] Error 1
  make[2]: Leaving directory '/cygdrive/c/Projects/mono/mono'
  Makefile:518: recipe for target 'all-recursive' failed
  make[1]: *** [all-recursive] Error 1
  make[1]: Leaving directory '/cygdrive/c/Projects/mono'
  Makefile:445: recipe for target 'all' failed
  make: *** [all] Error 2
  </code></pre>
  
  <p>I can only assume I am missing something from my cygwin install but I can't determine what that could be other than it is probably a library called <code>libdl</code>.</p>
  
  <p>I have been following this <a href="http://www.codeproject.com/Articles/815565/How-to-build-Mono-on-Windows" rel="nofollow">guide on codeproject</a> and also using this <a href="https://github.com/mono/mono/blob/master/appveyor.yml" rel="nofollow">yaml file</a> as reference.</p>