title: building with qmake on Linux - how to prevent qmake from linking to QtCore and QtGui
body: <p>I have a shared library (with no QT dependency) [library B] that links to another shared library (with no QT dependence as well) [library A].</p>
  
  <p>I am using Qmake and QT Creator 1.3. The problem is that when I build library B and run ldd on the executable, it is being linked to QtCore and QtGui, both of which are pulling in lots of unrequired files, resulting in an executable that is taking long to load, and has unwanted dependencies.</p>
  
  <p>I have tried just about everything to stop qmake from linking these libraries to library B.</p>
  
  <p>A snippet of my project file for library B is shown below:</p>
  
  <pre><code>TEMPLATE = lib
  LIBS += -L../datelib/bin -ldatelib_release
  
  QT -= gui core
  LIBS   -= -lQtGui -lQtCore
  CONFIG += dll
  CONFIG += debug_and_release
  
  CONFIG(debug, debug|release) {
  TARGET =targetnameD
  }else {
  TARGET = targetname
  }
  </code></pre>
  
  <p>I am using QtCreator 3 on Ubuntu 9.10</p>
  
  <p>QT is version 4.5.2</p>