How can I build executables/libraries in both release and debug mode on Windows?

Qt is built in both debug and release mode by default on Windows. When it comes to building your applications/libraries, you can specify

  1. CONFIG += debug_and_release

in your .pro file (this is already on by default on Windows).

If you want only one configuration to be generated, then whatever is last on the CONFIG line with respect to debug and release will be the one that qmake generates. If you want it to build both configurations of your application/library, then you need to add:

  1. CONFIG += build_all

to your pro file and then whenever you do nmake, both the debug and release versions will be built.

No comments

Write a comment

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