for example, you can put this in .pro file:
Qt Code:
  1. build_pass:CONFIG(debug, debug|release) {
  2. DEFINES += <symbols you want to be defined only in debug build>
  3. }
To copy to clipboard, switch view to plain text mode 
so in your case DEFINES += DEBUG should be ok. Of course, this is all true under assumption that you can rebuild this library when compiling your project.