Windows – How to set up the compiler and debugger in QtCreator

compiler-errorsqtqt-creatorwindows

In Qt for C++ , how do I setup a compiler and debugger in Windows for running a console application? It gave me this error when I try to debug an application :-1: error: Qt Creator needs a compiler set up to build. Configure a compiler in the kit options.

Best Answer

In general, you seem to lack the compiler and proper "kit" installation. Try to install msvc or mingw with the corresponding Qt installer, and then double check the kit settings.

If the auto-detection does not work out afterwards, you can always add a kit explicitly:

Select Tools > Options > Build & Run > Kits > Add.

You can find a screenshot below from my machine where you should look for that. Note that the screenshot was taken on my Linux box, but the place for the configuration should be unified on the UI.

enter image description here

See the documentation for further details:

Adding Kits