Why is the debug version of my application so slow?

This is due to the fact that Microsoft Visual C++ .NET’s debug version of the runtime libraries are slow, and by default Qt will link against the debug version of the runtime library if you configure Qt in debug mode. There is a workaround for this, simply do the following:

  1. Edit your qt\mkspecs\win32-msvc.net[2003/2005/2008]\qmake.conf file
  2. Where it states -MDd change it to be -MD
  3. Go into your qt directory
  4. nmake distclean
  5. Do configure -redo
  6. nmake

Then all that is left is to regenerate the Makefile for your application and rebuild it.

2 comments

September 7, 2010

Picture of rajeevpodar rajeevpodar

Lab Rat

Will it cause any type of problem in debugging the application?

September 22, 2010

Picture of sigrid sigrid

Hobby Entomologist

It doesn’t cause any problems with debugging the app itself, it just means you can’t debug into the C runtimes.

Write a comment

Sorry, you must be logged in to post a comment.