title: How to build Qt QOCI (Oracle Database driver) on Windows with MinGW?
body: <p>This last two days I spend trying to build both debug and release Oracle database drivers for Qt without success. The manual that is given in Qt Project (<a href="http://qt-project.org/doc/qt-4.8/sql-driver.html#how-to-build-the-qmysql-plugin-on-windows" rel="nofollow noreferrer">link</a>) is far incomplete and in reality things are much more complicated than what is shown.</p>
  
  <p>After much trying, I finally managed to build the dlls with the help of some also incomplete posts on the web:</p>
  
  <ul>
  <li><a href="http://www.qtcentre.org/threads/41904-Oracle-Call-Interface-(OCI)-driver-problems" rel="nofollow noreferrer">Oracle Call Interface (OCI) driver problems</a></li>
  <li><a href="https://stackoverflow.com/questions/12545501/header-files-not-found-while-making-oci-driver-in-qt">Header files not found While making Oci Driver in Qt</a></li>
  </ul>
  
  <p>Since both sources are incomplete and don't exactly teach how to create the dlls, I'll write here the method by answering this question.</p>
  
  <p>The only doubt that still remains is: is there a better way of doing this? I mean, I suppose that the standard way of compiling these libraries, as presented in the Qt Project website referenced above, should work without all the manual stuff that I (and the others) had to do. So was there something wrong about me/my Qt/anything else or Qt Project's manual is incomplete and that's that?</p>