I use Qt 5.0.1 with Windows SDK 7.1. If I create a new application, the Kits page of the New app wizard offers to create Debug and Release directories:
Debug: C:\Projects\MyProject-build-Desktop_Qt_5_0_1_MSVC2010_32bit-Debug
Release: C:\Projects\MyProject-build-Desktop_Qt_5_0_1_MSVC2010_32bit-Release
1) If I compile the app in Debug mode, Qt Creator creates two directories:
C:\Projects\MyProject-build-Desktop_Qt_5_0_1_MSVC2010_32bit-Debug\debug
C:\Projects\MyProject-build-Desktop_Qt_5_0_1_MSVC2010_32bit-Debug\release
The executable will be created in the former, C:\...-Debug\debug
.
2) If I compile the app in Release mode, I will get another pair of directories:
C:\Projects\MyProject-build-Desktop_Qt_5_0_1_MSVC2010_32bit-Release\debug
C:\Projects\MyProject-build-Desktop_Qt_5_0_1_MSVC2010_32bit-Release\release
In this case, the executable will be placed in the latter, C:\...-Release\release
.
What is the logic behind this nested directory structure? When does the IDE use the directories C:\...-Debug\release
and C:\...-Release\debug
?
UPDATE
@phyatt pointed out that turning off shadow building in project settings eliminates the problem. The debug and release directories will be generated inside the project's source directory:
C:\Projects\MyProject\debug
C:\Projects\MyProject\release
Unfortunately, this doesn't answer the above question. Moreover, now the project settings page displays a warning:
An incomplete build exists in C:\Projects\MyProject, which will be overwritten.
If you are only using a single compiler, I would go into the Projects tab > Build > General > Shadow Build, and uncheck Shadow Build.
This will simplify the configuration and folder structure, and may fix the bug for you.
Maybe go in and do a build clean for good measure.
Hope that helps.