title: Why is g++ refusing to create uic3.exe?
body: <p>I have MSYS installed and I am trying to compile Qt 4.8.0 as a set of static libraries on Windows 8. I've got the libraries built and unfortunately when building the Qt tools, I get this error:</p>
  
  <pre><code>$ g++ -Wl,-s -Wl,-subsystem,console -mthreads -o ../../../bin/uic3.exe object_s
  cript.uic3.Release  -L'd:/qt/lib' -L'd:/qt/lib' -lQt3Support -lQtSql -lQtXml -l
  QtGui -lQtNetwork -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lms
  img32 -lQtCore -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32
   -lssleay32 -llibeay32
  
  d:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/ld.exe: final link
   failed: Permission denied
  collect2: ld returned 1 exit status
  </code></pre>
  
  <p>For some strange reason, I'm getting a weird error about permissions - but I've double-checked that <code>g++</code> has write access to the folder in question. I've tried creating the file <code>uic3.exe</code> in the output folder and sure enough, <code>g++</code> deletes it and tries to create the file but fails again.</p>
  
  <p>So I tried running MSYS under an administrator account - still it refused to compile. There is plenty of disk space, so I doubt any sort of disk problem is to blame. I tried running <code>g++</code> with the <code>-v</code> option to get some more details, but there was no further information provided.</p>
  
  <p>What could cause this error?</p>
  
  <hr>
  
  <p><strong>Edit:</strong> I've tried writing the output file to different locations (by modifying the <code>-o</code> parameter) and it still reports the same error.</p>