Windows – In Windows, What Makes qmake Append a ā€œdā€ to a Debug Target

qmakeqtwindows

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.

Best Solution

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