tags:

views:

412

answers:

2

I'm using a provided .pro file and for some reason, it's configured so that the debug libraries do not have "d" appended to their library name. What causes this and how do I restore it?

E.g. QtGui4.dll (release) and QtGuid4.dll (debug)

Thanks.

+1  A: 

In your .pro file, add debug to the CONFIG variable:

CONFIG += qt debug

See: http://doc.qtsoftware.com/4.5/qmake-tutorial.html#making-an-application-debuggable

Mark Beckwith
+2  A: 

Add this to the .pro file and it will append _debug for mac and a d for windows debug build.

 CONFIG += debug_and_release

 CONFIG(debug, debug|release) {
     mac: TARGET = $$join(TARGET,,,_debug) 
     win32: TARGET = $$join(TARGET,,,d)
 }


CONFIG(xx, yy) This function can be used to test for variables placed into the CONFIG variable join(variablename, glue, before, after) Joins the value of variablename with glue, before and after.

Installing in Both Modes

TimW
Thanks for this, but I think Qt does this automatically with some configuration. I'm not looking to explicitly add this myself.
swongu
As far as I know Qt doesn't do it automatically and you'll have to add it yourself. See the link "Installing in Both Modes"
TimW